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

Abend while DB2 Table Hit


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

New User


Joined: 15 Apr 2009
Posts: 47
Location: Bangalore

PostPosted: Fri Apr 24, 2009 11:24 am
Reply with quote

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
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Fri Apr 24, 2009 12:26 pm
Reply with quote

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
View user's profile Send private message
bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 213
Location: Cochin/Kerala/India

PostPosted: Fri Apr 24, 2009 12:44 pm
Reply with quote

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
View user's profile Send private message
sibi Yohannan

New User


Joined: 15 Apr 2009
Posts: 47
Location: Bangalore

PostPosted: Tue Apr 28, 2009 9:48 am
Reply with quote

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
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Apr 28, 2009 10:00 pm
Reply with quote

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
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 Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts ISAM and abend S03B JCL & VSAM 9
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top