Eddie, Try this - CPYTOSTMF FROMMBR('/qsys.lib/joelib.lib/splf132.file/splf132.mbr') TOSTMF('/joe/test.txt') STMFOPT(*REPLACE) CVTDTA(*TBL) TBL('/qsys.lib/qascii.tbl') ENDLINFMT(*LF) Joe p.s. Just realized this does not give the trailing spaces.....maybe you could add them programatically before you transfer the file.......
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
Transfer EBCDIC to ASCII with trailing spaces and *LF
Collapse
X
-
Transfer EBCDIC to ASCII with trailing spaces and *LF
I've tried it all.(at least all I know) I'm trying to transfer an AS/400 database file to an ASCII text file, so I can FTP it offsite. Criteria: 1. I need to retain trailing spaces 2. *CRLF is no good. I need one or the other (*LF or *CR not both) I've found various methods that give me one or the other but not both. The closest i could come is to FTP the file to the IFS with 'LOCSITE TRIM 0' to retain spaces but game me the *CRLF at the end of each record. If you know, could you provide detail steps to accomplish this? thanks in advance
Comment
-
Transfer EBCDIC to ASCII with trailing spaces and *LF
CRTPF FILE(SomeFile) RCDLEN(601) CPYF FROMFILE(TextFile) TOFILE(SomeFile) MBROPT(*ADD) FMTOPT(*NOCHK) Somehow update byte 601 to be x0D or x0A in each record of SomeFile CPYTOSTMF FROMMBR('/qsys.lib/YourLib.lib/SomeFile.file/SomeFile.mbr') TOSTMF('/MyDir/SomeFile.txt') STMFOPT(*REPLACE) STMFCODPAG(*PCASCII) ENDLINFMT(*FIXED)
Comment
Comment