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

can SQLCODE 100 be tracked using DSNtep2 utility?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sriram K

New User


Joined: 17 Feb 2009
Posts: 32
Location: Bangalore

PostPosted: Mon Aug 24, 2009 2:35 pm
Reply with quote

Hi,

In my JCL there are 2 steps.

1 step - to update the table.
2 step - if updates are done, im writing some message to other tables.

Problem im facing:

In step-1 im using DSNTEP2 utility to update the table. Here even though there are SQLCODE 100 while updating, its giving me a succesful return code 0 for that step because of which step 2 starts executing.

If i get SQLCODE 100 or any bad return code i don't want to perform step 3 (next step). Can you suggest me on this.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Aug 24, 2009 2:50 pm
Reply with quote

Hi Sriram,

DSNTEP2 doesnt have lot of flexibility,
Rather you should handle this in program (may be COBOL or PL1 or what ever is there at your shop)
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Mon Aug 24, 2009 2:52 pm
Reply with quote

Hi Sriram,
You can try using PREPWARN YES, which will set the return code of the step to 4 for a warning. You can use the condition code to run the next step.

Please refer the following link for more information.

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dsnugk10/APPENDIX1.4.3?ACTION=MATCHES&REQUEST=DSNTEP2&TYPE=FUZZY&SHELF=&DT=20070125001207&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
Back to top
View user's profile Send private message
Sriram K

New User


Joined: 17 Feb 2009
Posts: 32
Location: Bangalore

PostPosted: Mon Aug 24, 2009 3:08 pm
Reply with quote

Hi srihari,

Thanks for your suggestion. Can you please let me know how to specify PREPWARN in JCL. I wrote like below

RUN PROGRAM(DSNTEP4) PLAN(DSNTEP4) PREPWARN(YES)

It gave me invalid keyword PREPWARN.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 24, 2009 3:17 pm
Reply with quote

Sriram,

From the link provided, that you obviously did not bother to read:

RUN PROGRAM(DSNTEP2) PLAN(DSNTEP91) PARMS('/ALIGN(LHS) MIXED TOLWARN(YES)') -
LIB('DSN910.RUNLIB.LOAD')
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Aug 24, 2009 3:49 pm
Reply with quote

Looks like PREPWARN is available in DB2 9.1 not in DB2 8 which I am using.. icon_sad.gif
Back to top
View user's profile Send private message
Sriram K

New User


Joined: 17 Feb 2009
Posts: 32
Location: Bangalore

PostPosted: Mon Aug 24, 2009 4:01 pm
Reply with quote

Hi dick,

Because of lack of knowledge i was searching for the specific keyword
PREPWARN. Thanks for the information. going forward i won't repeat.

And when i use the above satement LIB('DSN910.RUNLIB.LOAD')

im getting error IKJ56228I DATA SET DSN910.RUNLIB.LOAD NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED.
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Mon Aug 24, 2009 4:18 pm
Reply with quote

Sriram,
You have to use the loadlibs specific to your site. Please use your original job by changing the parms.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts REASON 00D70014 in load utility DB2 6
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts SQLCODE = -122 while using the scalar... DB2 4
No new posts Any JCL or VSAM Utility to get number... JCL & VSAM 1
No new posts SQLCODE = -16002 when using XMLEXISTS DB2 1
Search our Forums:

Back to Top