|
Hari wrote:
I am using CPYF to copy the contents of a Physical file to a flat file (of 132 bytes in length).
Here the decimal, float and negative data values are not copied properly in the destination (flat file) . Ex 12.34 is copied as 1234 and -5 as 5. Could anyonw help me in solving this?
Hari -
I'm assuming you are using CPYF with FMTOPT(*NOCHK).
From the help text for CPYF:
<Help>
</Help>
If you understand the statement above from the help text, neither of them get converted when copied to a flat file.
Example (CUSMST is a "regular" file, TESTFILE is a "flat" file):
CPYTOIMPF FROMFILE(CUSMST) TOFILE(QTEMP/TESTFILE) DTAFMT(*FIXED)
Here is what a signed field looks like in the output file:
Good luck, Steve Landess Austin, Texas (512) 423-0935
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.