IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Soc7 abend when passing the data from JCL to Cobol program


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nanda31

New User


Joined: 30 Mar 2007
Posts: 8
Location: hyderabad

PostPosted: Fri Mar 30, 2007 4:08 pm
Reply with quote

Hi,

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.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Mar 30, 2007 4:49 pm
Reply with quote

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.
Back to top
View user's profile Send private message
nanda31

New User


Joined: 30 Mar 2007
Posts: 8
Location: hyderabad

PostPosted: Fri Mar 30, 2007 7:11 pm
Reply with quote

Thanks William for the solution...but could u please explain the reason for the abend. is it something because it doesn't take the data in that format?

By the right now I am trying with the second option because it will be easy for a new user also to understand what value is getting passed...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Mar 30, 2007 7:28 pm
Reply with quote

Hello,

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.

Please let us know if you have questions. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top