Through IFS API's i can read/write stream files. After reading in a certain number of bytes, how can I add a line feed, then read another number of bytes, etc.?
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
adding a *LF to a stream file
Collapse
X
-
adding a *LF to a stream file
well, the only thing i could come up with that works is, to add and extra character to my file, and put x'25'(line feed) in that character, and then to a CPYTOSTMF *fixed (copies data with inserting any line feeds/carriage returns of its own). this accomplishes the double-whammy of needing trailing spaces and a *LF or *CR without both. as the AS/400 defaults with truncating and *CRLF. If having a *CRLF is not a problem for you, and you only need trailing spaces then a direct FTP from the AS/400 using 'LOCSITE TRIM 0' works fine. (commentary) why doesn't IBM combine the functionality of CPY, CPYTOSTMF, and CPYTOIMPF into one full featured command? Maybe the TAATOOL guys will see a need and fill it.
Comment