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
 

 

DB2 Program abending without giving any SQL error code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: DB2 Program abending without giving any SQL error code
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

Moderator


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

PostPosted: Mon May 29, 2017 8:37 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Mon May 29, 2017 10:32 pm    Post subject: Reply to: DB2 Program abending without giving any SQL error code
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: 378
Location: USA

PostPosted: Tue May 30, 2017 8:26 pm    Post subject: Reply to: DB2 Program abending without giving any SQL error code
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

Senior Member


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

PostPosted: Tue May 30, 2017 9:47 pm    Post subject:
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: 8118
Location: East Dubuque, Illinois, USA

PostPosted: Wed May 31, 2017 3:10 am    Post subject:
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: 1
Location: India

PostPosted: Thu Jun 01, 2017 5:05 pm    Post subject: Reply to: DB2 Program abending without giving any SQL error code
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm
No new posts Compiling program in endeavor for tra... RALAKKAL Compuware & Other Tools 4 Mon Jun 05, 2017 8:27 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


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