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: 213
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: 1249
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 Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts C03 ABEND sjiraga PL/I & Assembler 1 Thu Jun 01, 2017 4:51 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm


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