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