|
If you're put'ing from a physical file on the AS400 to flat file on a
pc or unix or whatever
1) OS400 sees that file as one record length 2) OS400 doesn't have
any idea what the transaction formats are in that file 3) OS400 will
translate the characters from EBCDIC to ASCII 4) OS400 will add a
CR/LF at the end of what it thinks is the record, that is the record
length of the physical file, same for all records. If you only have
characters in the first 38 bytes, OS400 will pad the remaining with
blanks to the end of the file record length and then and the CR/LF.
Here's one way to handle it:
Write a program to copy all the records to a stream file using the
write function from C (you can use it in RPG as a subprocedure).
Write x0d, x0a at the end of what you think is the correct record
length. When you read a 38 character "record", for instance, write
the first 38 and then write x0d x0a (or CR/LF). Then FTP the stream
file from wherever you put it in the IFS. >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.