× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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)
TOSTMF(PJTTEST_20221026_001.txt)
MBROPT(*REPLACE)
RCDDLM(*CRLF)
DTAFMT(*FIXED)
NUMFLDPAD(*ZERO)

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.

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




Paul Therrien
Ext: 2230
ptherrien@xxxxxxxxxxx<mailto:ptherrien@xxxxxxxxxxx>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.