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
 

 

Abend while DB2 Table Hit

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Abend while DB2 Table Hit
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    Post subject: Reply to: Abend while DB2 Table Hit
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: 208
Location: Cochin/Kerala/India

PostPosted: Fri Apr 24, 2009 12:44 pm    Post subject:
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    Post subject: Abend while DB2 Table Hit
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: 1239
Location: Richfield, MN, USA

PostPosted: Tue Apr 28, 2009 10:00 pm    Post subject:
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    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 SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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