Cassidy, Alan wrote:

What I REALLY WANT to do is to use a command to make a complete
duplicate of the file to the IFS, as is, as a .TXT file, as if it were
one flat record. Blank-fill is acceptable for the numerics, but
RIGHT-adjusted is expected.


It depends on how simple you want the process to be.

With CPYTOSTMF, you could probably get the process down to something like:

2. RCVF to get record size
3. CRTPF RCDLEN(recordsize) in QTEMP
4. CPYF FMTOPT(*NOCHK) from your file into the QTEMP file
5. CPYTOSTMF from the QTEMP record-image file

Or, if you like old stuff:

1. CPYTOPCD to copy your file member into a "PC document"
2. CPY out of /QDLS into your target streamfile

(Not sure how long CPYTOPCD will be around, but it does still work in V6R1.)

Otherwise, you might open it as a program-described file in RPG in order to read each record as a single field and write each line to your target streamfile.

Tom Liotta

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