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
 

 

Set RC=0 in IKJEFT01 while DROPing DB2 Objects

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
roykpc

New User


Joined: 27 Nov 2009
Posts: 2
Location: Kolkata

PostPosted: Wed Sep 08, 2010 2:27 am    Post subject: Set RC=0 in IKJEFT01 while DROPing DB2 Objects
Reply with quote

Dear All,

I have a situation where I am using DROP command to drop DB2 Objects in a JCL using IKJEFT01.

The problem is -
In some cases, DB2 objects are not present, it gives and SQLCODE of -204 and the JCL abends with RC=8.

Is there any way to Hardcode the JCL RC=0 in IKJEFT01. I am expecting something similar to doing SET 'MAXCC=0' in IDCAMS

--Kingshuk
Back to top
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Wed Sep 08, 2010 3:00 am    Post subject:
Reply with quote

Hello,

Quote:
I am using DROP command to drop DB2 Objects in a JCL using IKJEFT01.
If you did this in a program, you could control the rc. . .
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Sep 08, 2010 5:12 am    Post subject: Re: Set RC=0 in IKJEFT01 while DROPing DB2 Objects
Reply with quote

roykpc wrote:
I am expecting something similar to doing SET 'MAXCC=0' in IDCAMS


So why not do just that? Call IDCAMS and provide the SET MAXCC=0 command in a //SYSIN DD statement?
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1280
Location: Belgium

PostPosted: Wed Sep 08, 2010 1:12 pm    Post subject: Re: Set RC=0 in IKJEFT01 while DROPing DB2 Objects
Reply with quote

I believe DSNTEP2 continues after SQL-errors, just make sure you commit between each drop.
then afterwards set CC with the idcams

edit: I rechecked : apparently no need to commit and maximum 10 failed statements:
Quote:
First off, you need to know that DSNTEP2 has an internal parameter named MAXERRORS that controls the number of failing statements that can occur before it stops. A failing statement is one which returns a negative SQLCODE. The value of MAXERRORS is set to 10 inside the program, so DSNTEP2 will allow 9 failing SQL statements but when it hits the 10th failing statement, it will exit, COMMITting all other work.

This is ugly because it can wreak havoc on the integrity of your data. I mean, who wants to figure out what was run, what was impacted, and then try to rebuild a job to fix data and/or restart at the right place? To rerun DSNTEP2, remember that all SQL statements that completed with a 0 SQL code were committed. These statements should not be rerun. All SQL statements completed with a negative SQL code must be corrected and reprocessed.

Certain severe errors cause DSNTEP2 to exit immediately. One severe error is a -101 “SQL statement too long or too complex".

If any SQL errors occurred during the execution of DSNTEP2, a return code of 8 is returned by the job step.

At any rate, DSNTEP2 never issues an explicit COMMIT or ROLLBACK by itself. A COMMIT occurs at the end unless the program abends.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2431
Location: Netherlands, Amstelveen

PostPosted: Wed Sep 08, 2010 1:48 pm    Post subject:
Reply with quote

Maybe you can use :

EXIT CODE(0)
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 "DFSRRC00 vs IKJEFT01" for ... arunsoods All Other Mainframe Topics 5 Fri Aug 12, 2016 9:54 pm
No new posts COFVLH02E VLF trimmed objects younger... Robert Sample All Other Mainframe Topics 2 Tue Feb 09, 2016 3:37 am
No new posts Understanding Program Objects jerryte All Other Mainframe Topics 5 Tue Apr 14, 2015 12:53 am
No new posts Overriding SYSOUT of IKJEFT01 to a da... enrico-sorichetti IBM Tools 8 Sun Apr 07, 2013 5:19 am
No new posts Identify DB2 Objects that were create... sriteja DB2 1 Thu Jan 24, 2013 2:38 pm


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