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

S0C4 in a SQL query


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Fri Jul 10, 2009 2:24 pm
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
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
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jul 10, 2009 4:50 pm
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jul 10, 2009 5:58 pm
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jul 10, 2009 8:04 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
Search our Forums:

Back to Top