View previous topic :: View next topic
|
Author |
Message |
sibi Yohannan
New User
Joined: 15 Apr 2009 Posts: 47 Location: Bangalore
|
|
|
|
Hi,
I am doing a DB2 Table SELECT statement in a COBOL Program. Below is the code
Code: |
EXEC SQL
SELECT Column_A
INTO :Data-A
FROM Table1
WHERE Emp_Code = :Emp-code-WS
END-EXEC.
DISPLAY 'SQLCODE :-' SQLCODE.
IF SQLCODE NOT = +000
PERFORM DB2-ERROR. |
But during run time the SELECT statement is abending, below are the error message, also mentioned in the dump that, unhandled condition is reached as the reason for abort.
Code: |
The system or user abend U2222 R=NULL was issued.
ABENDED S000 U4087 |
Even it is not displaying the SQL error code, seems the SELECT statement itself is aborting.
Someone can help with this?
Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj |
|
Back to top |
|
|
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 171 Location: India
|
|
|
|
Sibi Yohannan,
1. Try to execute the same SQL in Spufi for thousand records if it executes then check the Declaration of that variable
2.
Code: |
IF SQLCODE NOT = +000
|
can you give them as SQLCODE NOT EQUAL TO ZERO |
|
Back to top |
|
|
bipinpeter
Active User
Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India
|
|
|
|
Hi Sibi,
I( think your program abending before executing the SQL statements.Please do a search of '4087' or '2222' in your program,may be this is the user abend and abend code 2222 or 4087 will be populating in program somewhere.
Regards,
Bipin Peter |
|
Back to top |
|
|
sibi Yohannan
New User
Joined: 15 Apr 2009 Posts: 47 Location: Bangalore
|
|
|
|
Thanks a lot for your quick reference!!!
Actually the issue was with the IBM System side, the PLAN had some issue so the PLAN was noty available for the execution.
When a PLAN is not available or PLAN Name given is wrong, Is there any specific Return Code a JCL give? |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
The BIND step of your compile/link/bind JCL might have indicated a problem. Always check the return code of all 3. |
|
Back to top |
|
|
|