Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Soc7 abend when passing the data from JCL to Cobol program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
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    Post subject: Soc7 abend when passing the data from JCL to Cobol program
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: 3158
Location: Tucson AZ

PostPosted: Fri Mar 30, 2007 4:49 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Mar 30, 2007 7:28 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us