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

Getting S0C7 in the compute statement


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
raviprabhu

New User


Joined: 20 Oct 2006
Posts: 29

PostPosted: Mon Feb 17, 2014 10:23 pm
Reply with quote

I am getting soc7 in the compute statement

Perform varying I from 1 by 1 until I>10
Compute A = A + B (I)
End-perform

A - 9(7)v99
B - S9(7)

Please help how to resouve this
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Mon Feb 17, 2014 10:27 pm
Reply with quote

Have you initialized A and B to valid numeric values before invoking the PERFORM? icon_rolleyes.gif
Back to top
View user's profile Send private message
raviprabhu

New User


Joined: 20 Oct 2006
Posts: 29

PostPosted: Tue Feb 18, 2014 12:36 am
Reply with quote

yes have initialized
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Tue Feb 18, 2014 12:54 am
Reply with quote

1) Why A is not delclared as S9(7)v99 ?
2) Try adding a Display for all of B(I) and all A, this will narrow down your findings as which contains bad data.
3) Also what is expected if A= 9999999 and B = 9 ?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Tue Feb 18, 2014 12:56 am
Reply with quote

Is B in an interal array/table?

Show the ten values for B.

Show more working storage/code to give a better picture.

Put a Display statement of A and B(I) before the compute.

Should this be in the student section?
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts S0C7 - Field getting overlayed COBOL Programming 2
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Relate COBOL statements to EGL statement All Other Mainframe Topics 0
No new posts process statement for SUPREC, CMPCOLM... TSO/ISPF 4
No new posts SYNCSORT/ICETOOL JOINKEYS SORT Statem... DFSORT/ICETOOL 13
Search our Forums:

Back to Top