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

getting S0C7 in the if condition


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

New User


Joined: 11 May 2005
Posts: 3

PostPosted: Fri Dec 02, 2005 6:22 pm
Reply with quote

hi,

i am getting S0C7 abend when this statement encounters.

IF FB-OPTCOMM (FB) IS EQUAL TO ZEROS AND
FB-TRDCOMM (FB) IS EQUAL TO ZEROS

and the declaration of the variables are like this:

77 FB PIC 9(5) COMP-3 VALUE ZERO.
03 FB-TRDCOMM PIC S9(11)V9(5) COMP-3
03 FB-OPTCOMM PIC S9(11)V9(5) COMP-3

can anyone help me how to solve this?

Regards,
sankar
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Dec 02, 2005 7:01 pm
Reply with quote

Initialize both the variable once.

Regards,

Priyesh.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Dec 03, 2005 9:44 am
Reply with quote

The solution to your prob depends on whether you've moved data to those 2 fields before the IF stmt is executed.

If no, then Priyesh's suggestion will solve it.

If yes, that means you don't have valid COMP-3 data in 1 or both of the fields. You must then look at where the data came from.
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 S0C7 - Field getting overlayed COBOL Programming 2
No new posts How to give complex condition in JCL . CLIST & REXX 30
No new posts selectively copy based on condition DFSORT/ICETOOL 3
This topic is locked: you cannot edit posts or make replies. Control-m JOB executing even when the... Compuware & Other Tools 6
No new posts Dynamic condition checks COBOL Programming 5
Search our Forums:

Back to Top