I am trying to pass the data from JCL to Cobol program through PARM.
My requirement is to pass +100.00 to a variable having PIC s9(3)v99.
when I am doing that it is giving soc7 abend.
If I change the picture clause of linkage section variable to 9(03) it is working fine.
Can anybody suggest in this regard.
Please keep in mind I have to keep linkage section variable as PIC s9(3)v99.
Without getting into the proper way to pass and recieve data through the linkage section.......
You could pass "10000" to s9(3)v99.
you could pass "+100.00" to X(7) and then COMPUTE (target area) = FUNCTION NUMVAL (passed area) where passed area is the X(7) in the linkage and target area is S9(3)V99 in working storage. If you really need the linakage variable as S9(3)V99, you can redefine the X(7) as the numeric but you will still have to use WS for the numval.
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
The abend is caused because you gave the program non-numeric data in a field defined to only have numerics. When the code tried to use the invalid data, it raised the s0c7 (data exception) - which says the system took exception to the non-numeric input.
Please refer to the recommendations provided and look them up in your Fine Manual (if you don't have the COBOL manuals, you may access them from this forum.