|
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 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.