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

This sounds like the normal and expected behavior to me? CPYTOIMPF formats numbers as text, which means there needs to be extra space for things like the decimal point and sign.

If you are looking for the raw bytes in the record rather than a text format suitable for import into other databases, then CPYTOIMPF is the wrong tool.

On 10/26/2022 9:11 AM, Therrien, Paul via MIDRANGE-L wrote:
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:


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.

Paul Therrien
Ext: 2230

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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