× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Well, I'm glad you asked (and answered) as that was the first thing that popped into my head. I completely missed the special file part. Haven't used one since the S/38 days....

Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris
Sent: Friday, November 18, 2016 5:01 PM
To: Rpg400 Rpg400-L
Subject: Re: free format replace I-specs and plist

OOOpppssss - answered my own question - I forgot that it was a SPECIAL file.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Nov 18, 2016, at 5:58 PM, Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> wrote:

Arco,

There is no free-format equivalent to PLIST. Probably the best solution would be to write an open access version of UNIXCMD.

But, aside from the PLIST, everything else can be done with free format. You can replace any I/O specs with data structures.

For example, this is EXAMPLE4 converted to free format:

dcl-f UNIX special(1000) pgmname('UNIXCMD')
plist(unixparm) usropn;
dcl-f QSYSPRT printer(132) usage(*output);
dcl-s cmd char(5000);
dcl-ds record len(1000) end-ds;
dcl-ds outrec len(132) end-ds;

C UNIXPARM PLIST
C PARM cmd

cmd = 'cd /tmp; ls';
open UNIX;

read UNIX record;
dow not %eof(UNIX);
outrec = record;
write QSYSPRT outrec;
read UNIX record;
enddo;

close UNIX;
*inlr = *on;




On 11/18/2016 3:22 AM, Arco Simonse wrote:
Hi all,

Maybe a dumb question, but here it goes...

We're using Scott's great UNIXCMD tool in our programs, and we want convert
our program to "fully free".
Replacement of the file declaration is no problem:

dcl-f UNIX special(1000) pgmname('UNIXCMD') plist(unixparm) usropn;
dcl-s cmd char(5000);

But how do I replace these specs?

IUNIX NS
I 1 1000 Record


C UNIXPARM PLIST
C PARM CMD


Many thanks!
Best regards,
-Arco

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.