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

DB2 Program abending without giving any SQL error code


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rahulgarg14

New User


Joined: 16 Apr 2007
Posts: 10
Location: gurgaon - india

PostPosted: Mon May 29, 2017 8:10 pm
Reply with quote

I bring down the production COBOL DB2 program to test region. Compiled it and bind it. While execution program is abending while trying to open the cursor. But it is not giving any SQL code. Instead job is abending with abend code SOC1 .

When I submitted the job with production load module it worked fine.

Please suggest is there any issue with compiler routine being used. I am using SCLM for compilation. Its a configuration tool like ENDEVOUR and CHANGEMAN.

Please let me know if additional details are needed.

Thanks in advance.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Mon May 29, 2017 8:37 pm
Reply with quote

Are you executing the correct program and also did you check the compiler warnings??
Back to top
View user's profile Send private message
rahulgarg14

New User


Joined: 16 Apr 2007
Posts: 10
Location: gurgaon - india

PostPosted: Mon May 29, 2017 10:03 pm
Reply with quote

Yes I am executing the correct program. I also checked compiler jobs and no warnings were there. So not sure what is happening.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon May 29, 2017 10:32 pm
Reply with quote

Quote:
But it is not giving any SQL code. Instead job is abending with abend code SOC1 .


unfortunately the information posted is not enough to provide any help
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Tue May 30, 2017 8:26 pm
Reply with quote

How do you know that the program is abending at 'OPEN CURSOR' ? Did you debug ? What happens when you run the same query through SPUFI ?

I would suggest you validate your Test JCL against that of Prod and see if you have anything missing Or something that you need to change in Test but you haven't and it's still pointing to Prod.

.
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 May 30, 2017 9:47 pm
Reply with quote

Quote:
While execution program is abending while trying to open the cursor. But it is not giving any SQL code.
Why should we believe on this? Every "EXEC SQL" will give you some SQLCODE, the program don't display it in the spool and that's the question as to why you don't have display's? If you want to see then edit the program and display SQLCODE after OPEN CURSOR and rerun to know the SQLCODE or send an email to DBA with the steps of the execution, they should be able to tell you the right way.

But why do you need to compile and bind it in test region? you can use prod load and run as it worked for you.?
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: Wed May 31, 2017 3:10 am
Reply with quote

Quote:
Please suggest is there any issue with compiler routine being used.
No, there is no issue with the compiler. You are getting different results in production and test. These different results could be due to:
1. Data being different
2. Program being different
3. Environment being different (rare, but it does happen)

The S0C1 abend is an Operation Exception -- which has many different possible causes. You need to start narrowing down where the issue could be: for example, run the test program against the production data base; if you don't get the S0C1 then your test data is NOT a copy of your production data. If you run the production program against your test data and don't get the S0C1 then your test program and production program are not the same. If you copy production data over to your test system, run your test program, and still get the S0C1 then your test program is NOT the same as what is running in production. Continue narrowing down until you figure out what the cause of the problem is. But don't do several things at once (such as copying production data to test and copying the production program to test -- then if you don't get the S0C1 abend you don't know which change helped).
Back to top
View user's profile Send private message
sumannath

New User


Joined: 20 Mar 2017
Posts: 8
Location: India

PostPosted: Thu Jun 01, 2017 5:05 pm
Reply with quote

As Rohit rightly states, every SQL query should return some sort of SQLCODE. Check your program to see if you are displaying this SQLCODE. Also how are you sure that its the OPEN CURSOR that is abending. It may be some other issue with data.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
Search our Forums:

Back to Top