Posted: Sun Nov 28, 2010 12:52 am Post subject: Comp-3 variables to Comp variables.
1) Can we move a Comp-3 variable in to a Comp Variable? If Yes how?
2) Can we pass a Comp-3 variable in to a Alphanumeric variable using reference modification? If no than is there any way i can do so?
I tried to Move a Comp-3 variable in to Comp variable or vice versa and was getting SOC-7 Abend. I am not sure what data type should i give for them. For ex i was trying to move A to B where A is defined as PIC S9(18 ) COMP-3 and B defined as S9(10) COMP.
For the second point i tried to move a COMP-3 data in to a Alphanumeric variable but was facing a data truncation error. For ex:
01 A PIC X(300).
01 B PIC S9(18 ) COMP-3.
MOVE 123456789012345678 TO B.
MOVE B TO A(18:10).
The resultant data which got moved to A is 1 2 3 4 5 6 7 8 9
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum