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
 

 

Getting S0C7 in the compute statement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Getting S0C7 in the compute statement
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Mon Feb 17, 2014 10:27 pm    Post subject: Reply to: getting soc7
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    Post subject:
Reply with quote

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

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Tue Feb 18, 2014 12:54 am    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Tue Feb 18, 2014 12:56 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
This topic is locked: you cannot edit posts or make replies. Updating value of key using rewrite s... ParminderKumar COBOL Programming 4 Thu Aug 04, 2016 12:46 am
No new posts Inspect statement spoorni COBOL Programming 5 Mon Jun 06, 2016 9:53 pm


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