View previous topic :: View next topic
|
Author |
Message |
sivachandran M
New User
Joined: 17 Sep 2007 Posts: 9 Location: chennai
|
|
|
|
Hi,
i want to move some COMP-3 fields from one file to another file's Packed decimal fields. while moving i got SOC7 abend. so defined WS variable with same length of COMP-3 fields.
moved COMP-3 to WS-XXX
moved WS-XXX to PD
No SOC7 now & values are moved well. but i m unable to see the correct values in my output file getting some values like this 'X'0CF6FC'. Please help me |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
Please provide the variable declarations. |
|
Back to top |
|
|
sivachandran M
New User
Joined: 17 Sep 2007 Posts: 9 Location: chennai
|
|
|
|
ABCD-APPL-AS PIC S9(05) COMP-3.
WS-APPL-AS PIC 9(05) VALUE ZEROES.
CDEF-APPL-AS PIC S9(05) PACKED-DECIMAL. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
i want to move some COMP-3 fields from one file to another file's Packed decimal fields. while moving i got SOC7 abend. so defined WS variable with same length of COMP-3 fields.
moved COMP-3 to WS-XXX
moved WS-XXX to PD
No SOC7 now & values are moved well. but i m unable to see the correct values in my output file getting some values like this 'X'0CF6FC' |
Just out of curiosity, why do you think this is a solution to your problem? If you're getting a S0C7, then there is non-numeric data involved somewhere and just moving it to an intermediate field won't generally make it numeric.
Why not code up something like ...
Code: |
IF ABCD-APPL-AS NUMERIC
MOVE ABCD-APPL-AS TO CDEF-APPL-AS
ELSE
<handle non-numeric field -- error message or move zero>
END-IF |
|
|
Back to top |
|
|
sivachandran M
New User
Joined: 17 Sep 2007 Posts: 9 Location: chennai
|
|
|
|
Thanks robert |
|
Back to top |
|
|
|