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
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
No new posts Extract 2 more lines below line that ... DFSORT/ICETOOL 2
No new posts Build two or more rows given some con... DFSORT/ICETOOL 9
No new posts REMOVE DUPLICATE RECORDS BASED ON A S... DFSORT/ICETOOL 4
Search our Forums:

Back to Top