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



I probably should have used the fix font type.  This looks much better. 

-----Original Message-----
From: Lim Hock-Chai 
Sent: Thursday, November 11, 2004 9:27 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Processes two members of the same file in a RPG program.


if you are using RPGIV/RPGLE and it support extmbr keyword, you can do it 
without CL. (note: haven't tested.  hopefully it work :))

 * read from file
FMYFILE    IF   E           K DISK    extmbr(mbr1)       
 * output to file (program decribe file)
FMYFILEOUT OF   F 1024        DISK    extfile('MYFILE')      
F                                     extmbr(mbr2) 

 * declare a temp file that is the same length as the output file
 * (notice the pointer point back to the MYFILEDS)
D MYFILEOUTDS     DS          1024        based(pMYFILEOUTDS)
D pMYFILEOUTDS    S               *   inz(%addr(MYFILEDS))
                                                            
D MYFILEDS      E DS                  extname(MYFILE)

C                   read      MYFILEFmt                         
C                   write     MYFILEOUT     MYFILEOUTDS
C                       delete    MYFILE


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.