View previous topic :: View next topic
|
Author |
Message |
rahulgarg14
New User
Joined: 16 Apr 2007 Posts: 10 Location: gurgaon - india
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Are you executing the correct program and also did you check the compiler warnings?? |
|
Back to top |
|
|
rahulgarg14
New User
Joined: 16 Apr 2007 Posts: 10 Location: gurgaon - india
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
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 |
|
|
RahulG31
Active User
Joined: 20 Dec 2014 Posts: 446 Location: USA
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3049 Location: NYC,USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
sumannath
New User
Joined: 20 Mar 2017 Posts: 8 Location: India
|
|
|
|
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 |
|
|
|