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
 

 

S0C4 in a SQL query

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Fri Jul 10, 2009 2:20 pm    Post subject: S0C4 in a SQL query
Reply with quote

Hello,

I have a Cobol-DB2 Program which is supposed to run with high volume of data. It is Abending in Production with S0C4 when the input records are more than 20000. The listing points to a simple
Code:
select '1' from
query which would get executed for each of the records. The program abends once it has processed more than 20000 records. It is not the first SQL in the program, so I do not think there is a connectivity problem. In abendaid, The regesters 14 and 15 contain 0. But they should contain source and destination addresses. Let me know if i need to show some more info.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 10, 2009 2:24 pm    Post subject:
Reply with quote

Did this not abend with the same code for the same reason in acceptance testing ?
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Fri Jul 10, 2009 2:28 pm    Post subject:
Reply with quote

It is acceptance testing.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jul 10, 2009 2:42 pm    Post subject:
Reply with quote

well, a S0C4 means you are trying to address something that isn't addressable.

you have an input file which when the number of records read exceeds 20,000 you tend to have a problem.

do you have a cobol internal table?
what is the program doing?
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Fri Jul 10, 2009 3:35 pm    Post subject:
Reply with quote

Quote:
do you have a cobol internal table?

Yes. About 13 indexed and 25 subscripted arrays. I have displayed all the indexes to make sure its not array overflow. The values are within array limits at the time of abend.

Quote:
what is the program doing?


It processes the input records, does a few updates/inserts/deletes on the database. We have a key field in the input file. The program gets all the details for the key from 12 tables and processes all the records in the file having the same key. Once the key changes, It will do the updates/inserts/deletes on the database.

Quote:
well, a S0C4 means you are trying to address something that isn't addressable.

But the SQL has been executed for all the records successfully till the abend. icon_exclaim.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7936
Location: Bellevue, IA

PostPosted: Fri Jul 10, 2009 4:50 pm    Post subject:
Reply with quote

Quote:
Quote:
well, a S0C4 means you are trying to address something that isn't addressable.

But the SQL has been executed for all the records successfully till the abend.
Your reply is non-responsive. The SQL may have successfully executed, but you've still got an addressing issue -- or your program would not be getting a S0C4.

I recommend you recompile with SSRANGE to determine if COBOL can identify the problem. If the problem recurs after the recompile, please post the exact abend message and registers display in BBcode format so we can see the error. And while you're recompiling, use the LIST option instead of OFFSET to get a detailed program listing.
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Fri Jul 10, 2009 5:44 pm    Post subject:
Reply with quote

I recompiled with SSRANGE. But I do not know how to run with CHECK(ON) run time option. I need the syntax.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7936
Location: Bellevue, IA

PostPosted: Fri Jul 10, 2009 5:58 pm    Post subject:
Reply with quote

IIRC,
Code:
PARM='/CHECK(ON)'
should do it ... but I don't remember if the slash is first or last in the parameter.
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Fri Jul 10, 2009 7:32 pm    Post subject:
Reply with quote

It is an array overflow. Thanks Robert.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7936
Location: Bellevue, IA

PostPosted: Fri Jul 10, 2009 8:04 pm    Post subject:
Reply with quote

Glad to hear you've identified the problem!
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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


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