5 pts.
 Copy File from PC file to Iseries- Change record length.
I am trying to copy a PC text file and copy it in a wrapping format to an ISeries DB File with a single 128 length field. I am trying CPYFRMIMPF, CPYFRMPCD, CPYFRMSTRMF and they all seem to cut off part of the record. Can this be done short of counting characters in a record?

Software/Hardware used:
Windows, ISeries
ASKED: October 8, 2009  7:45 PM
UPDATED: October 9, 2009  10:50 PM

Answer Wiki:
Sounds like you are trying to copy a long character string into a flat file and for a single input record you want to output multiple records. I do not believe you can do that in one step. You would have to copy it to a longer file and then use SQL or a program to split it into multiple records. Another option would be to copy into a file that had a variable length field,
Last Wiki Answer Submitted:  October 8, 2009  8:08 pm  by  CharlieBrowne   32,865 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,865 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Maybe the simplest option is to use FTP. You can FTP on the same system from a streamfile into a flat file, and, IIRC, FTP will do that kind of wrapping. (I haven’t needed to disturb lines like that, so I haven’t actually seen such wrapping.)

Tom

 108,135 pts.