50 pts.
 CPYTOIMPF – Physical file to IFS, get imbedded blanks
I have a physical file with the following fields. (field - attribute - sample content) FILL01 - 1A - blank KEY - 8A - AAPCTINV LENGTH - 2S 0 - 60 TEXT - 60 A - 8028038 When looking at the file using DSPPFM, the info = AAPCTINV608028038 Note, it has 1 space at the begining Using the following CPYTOIMPF FROMFILE(mylib/myfile) TOSTMF('/folder1/folder2/myfile.txt') STMFCODPAG(*STDASCII) RCDDLM(*CRLF) DTAFMT(*FIXED) When I look at the file on the IFS it shows as below: AAPCTINV60 8028038 The leading space is kept - but for some reason, there is a new space in there, between the LENGTH field and the TEXT field. I suspect it has to do with the LENGTH field being defined as signed? I don't care however - I want the data to come across with the same field placements FILL01 in column 1-1 KEY in column 2-9 Length in column 10-11 Text in column 12-60 Is there a parameter on the CPYTOIMPF command that controls this? or should I use a different command entirely - which I am open to, I want the easiest way possible to copy a DDS described file to the IFS. Thanks

Software/Hardware used:
ASKED: May 7, 2008  5:04 PM
UPDATED: May 8, 2008  9:10 AM

Answer Wiki:
Hi, If you want the data in exactly the same format I suggest trying CPYTOSTMF. Regards, Martin Gilbert.
Last Wiki Answer Submitted:  May 8, 2008  9:10 am  by  Gilly400   23,625 pts.
All Answer Wiki Contributors:  Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


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