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

Abend U222 when handling sqlcodes in the program


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

New User


Joined: 22 Nov 2005
Posts: 24

PostPosted: Sat Mar 17, 2007 2:01 pm
Reply with quote

Hi,

I have a select query which can yield me one row or no rows. i have done error handling when sqlcode is not = +100 and sqlcode is not = +000. i have not handled the code for sqlcode =+100. I am getting a u222 abend when i run the job. can someone tell me y this is happening?

Regards,
Nimi
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Mar 17, 2007 8:38 pm
Reply with quote

Hello,

Become familiar with the "Completoin Codes" part of the "MVS System Codes" manual which is linked to the "Manuals" link on the top of the web page.

An s322 abend is because the operator (or automation) canceled the job.

In your case, this probably happened because the program was or appeared to be in a loop.

Look at the code and determine if it will always proceed, rather than repeating the same set of code over and over. One guess is that the program keeps trying to "read" when it should not.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Mar 17, 2007 10:20 pm
Reply with quote

Hello,

Oooopps icon_redface.gif

Not only did i mis-read the post, i typo'ed the response.

This
Quote:
An s322 abend is because the operator (or automation) canceled the job.
was supposed to be s222 - which was not the U222 posted.

Bad day at eyeball/keyboard coordination.

To continue - has this program ever run successfully or is it a new program?

It appears there is a UDP open failure.
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Wed Mar 21, 2007 1:35 pm
Reply with quote

Is that failing at select query..? What is the sql code you are getting..?
The return code says its a User abend. May be some thing wrong in the application program. If its Pl/1 what is the ONCODE ..?
Back to top
View user's profile Send private message
nimisanand

New User


Joined: 22 Nov 2005
Posts: 24

PostPosted: Sun Mar 25, 2007 6:05 pm
Reply with quote

Hi,

This is an existing program. I just introduced a new query in it. The program abended with U222 and said it is not able to recognize what it needs to do when sqlcode = +100.

Regards,
Nimi
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Mar 25, 2007 7:10 pm
Reply with quote

Hello,

Does this mean that the program itself issues the U222 abend?

Please post the "new" query and the sqlcode checking as well as the code that generates the U222.

Whe nwe can see what you are working with, we may be able to offer suggestions.
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 Using API Gateway from CICS program CICS 0
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top