We have received a file that was created on an IBM system using the IBM CPYTOPCD command, Translation table = *NONE, Format of PC data =*NOTEXT. Our information indicates that this command copies a system database file to a PC Document. The file is created on a QSYS file system on an I Series IBM. The output file is iin EBCDIC and containes TEXT, ZONED, and PACKED data, mixed in each record. We are able to convert the TEXT and ZONED data just fine but can not get accurate data out of the PACKED data.
The PACKED data is defined in the file layout document as PACKED 9 2
We define the data as PIC S9(7)V9(2) COMP-3. in our input record and as PIC S9(7)V9(2) SIGN TRAILING SEPARATE.
In the PROCEDURE section, we do the following: ADD "PACKED ITEM NAME" TO ZERO GIVING "TEXT ITEM NAME"
We get a "good" number and sign but the number is not correct.
An example: Display of "PACKED ITEM NAME" = 27??6.71, Display of "TEXT ITEM NAME" = 2856.71. The expected value is: 2078.73.
We have received a file that was created on an IBM system using the IBM CPYTOPCD command, Translation table = *NONE, Format of PC data =*NOTEXT. Our information indicates that this command copies a system database file to a PC Document. The file is created on a QSYS file system on an I Series IBM. The output file is iin EBCDIC and containes TEXT, ZONED, and PACKED data, mixed in each record. We are able to convert the TEXT and ZONED data just fine but can not get accurate data out of the PACKED data.
The PACKED data is defined in the file layout document as PACKED 9 2
We define the data as PIC S9(7)V9(2) COMP-3. in our input record and as PIC S9(7)V9(2) SIGN TRAILING SEPARATE.
In the PROCEDURE section, we do the following: ADD "PACKED ITEM NAME" TO ZERO GIVING "TEXT ITEM NAME"
We get a "good" number and sign but the number is not correct.
An example: Display of "PACKED ITEM NAME" = 27??6.71, Display of "TEXT ITEM NAME" = 2856.71. The expected value is: 2078.73.
I'm not an expert in IBM data formats. But have you tried compiling the COBOL program with -Dci? That is supposed to use IBM numeric formats.
If you're already doing that, or doing it doesn't change the behavior, I'm afraid I have no better ideas.
I'm not an expert in IBM data formats. But have you tried compiling the COBOL program with -Dci? That is supposed to use IBM numeric formats.
If you're already doing that, or doing it doesn't change the behavior, I'm afraid I have no better ideas.
Thank you. One of our other programmers is already doing that. When I tried it, I saw no difference. We are able to convert all of the data accept the Packed items. One of the blogs I read said that they felt the only way was to unpack the data on the IBM and then copy if off. Unfortunately, we do not have that option.
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.