I am executing a CPYTOIMPF from a database file to the IFS in to get a flat file (FIXED length fields)
I have 2 numeric fields:
W1SDTE Zoned 8, 0
W1RQVQ Zoned 9, 0
This is the command:
CPYTOIMPF FROMFILE(PJTTEST/ANACMP001 ANACMPFL)
The numeric fields are being put into the flat file with 2 extra bytes.
20221001 => 0020221001
(8,0) comes out as length 10.
000000001 => 00000000001
(9,0) comes out as Length 11.
Can this be fixed with the CPTTOIMPF? Or should I use another command or function.
This is not a 1-off task, I am building a backup procedure on the IBM I to backup files to the IFS before FTPing them to remote locations.
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.