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

Setting Return code to Zero


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

New User


Joined: 16 Nov 2005
Posts: 21

PostPosted: Fri Apr 13, 2007 8:42 pm
Reply with quote

Hi,
I have one job which has 5 steps. In that 3rd step will always give return code 4. But i need to set the final return code to zero instead of MAXCC=04. Is this possible using any utility?

thanks
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: Fri Apr 13, 2007 9:08 pm
Reply with quote

Hello,

No, you cannot reset previous return codes.

Why do you need to do this?
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Mon Apr 16, 2007 10:56 am
Reply with quote

abhicet2003 wrote:
Hi,
I have one job which has 5 steps. In that 3rd step will always give return code 4. But i need to set the final return code to zero instead of MAXCC=04. Is this possible using any utility?

thanks


Why do need to convert the MAXCC to zero, you can as well check for the return code of the STEP03. i.e. STEP03.RC and code COND accordingly, please ignore this advice if your requirement is not met thisway.
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: Fri Apr 20, 2007 5:45 am
Reply with quote

Hello,

Is your job now working acceptably?
Back to top
View user's profile Send private message
hallecodec

New User


Joined: 05 Sep 2006
Posts: 30
Location: Philippines

PostPosted: Fri Apr 20, 2007 2:56 pm
Reply with quote

hi abhicet2003,

please try this piece of code:

IF MAXCC=4 THEN SET MAXCC=0
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 20, 2007 3:10 pm
Reply with quote

hallecodec

How do you know that the program that is being executed will accept your parameters ? It could be that the program is an in house coded program.
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 Apr 21, 2007 1:52 am
Reply with quote

Hello,

Did you try this
Quote:
please try this piece of code:

IF MAXCC=4 THEN SET MAXCC=0
at your location before posting it?

It should work inside an IDCAMS step, but i believe it will not work in JCL directly.
Back to top
View user's profile Send private message
hallecodec

New User


Joined: 05 Sep 2006
Posts: 30
Location: Philippines

PostPosted: Mon Apr 23, 2007 8:07 am
Reply with quote

hi -

yes dick, you're correct that 'IF MAXCC...' code will run using IDCAMS.

sorry, i forgot to include it in my post.
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: Mon Apr 23, 2007 8:30 am
Reply with quote

Not to worry icon_smile.gif

I wonder if abhicet2003 has an answer that will work in the posted question? We've not heard anything for several days. . .
Back to top
View user's profile Send private message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Mon Apr 23, 2007 10:26 am
Reply with quote

Hi.. can we know why u need to reset the RC to 0000.. so that we can find some other way.. to fix your issue...
I hope as per IDCAMS we can set the max code to High i.e if maxcc = 04 then we can set to RC greater than 04.
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Mon Apr 23, 2007 11:16 am
Reply with quote

Hey,

Quote:
I hope as per IDCAMS we can set the max code to High i.e if maxcc = 04 then we can set to RC greater than 04.


There is no restrictions like that.. u can even set an RC less rhan what u get.. i.e if maxcc=04, then u can set to RC less than 04 also.. icon_lol.gif
Back to top
View user's profile Send private message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Mon Apr 23, 2007 11:40 am
Reply with quote

Hi,

I Accept we can give any return code for the step.. but at the end of the job the Highest return code will get displayed... so if RC=04 in first step and we set to zero in further step... at end the job will display RC=04.. as per the req he need zero at end of job...
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Mon Apr 23, 2007 12:25 pm
Reply with quote

hey,

I think we are getting confused..

Quote:
so if RC=04 in first step and we set to zero in further step...


U cannot alter the return code of a previous step using IDCAMS.
using IDCAMS u can alter the return code which u get in that IDCAMS step only..
Back to top
View user's profile Send private message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Mon Apr 23, 2007 3:03 pm
Reply with quote

Raak,

yes... we can set any RC for the step only..

Quote:

using IDCAMS u can alter the return code which u get in that IDCAMS step only..


but at the end of the job can we get the RC as Zero... if any step in the job has a non-zero return code ?
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Mon Apr 23, 2007 3:13 pm
Reply with quote

hi cvadlamudi

Quote:
but at the end of the job can we get the RC as Zero... if any step in the job has a non-zero return code ?


i think we can luk at the top of this page for the answer.. and it is a big NO...
Back to top
View user's profile Send private message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Mon Apr 23, 2007 3:44 pm
Reply with quote

Raak,

yes.. that is rite we cannot set the RC to zero but we can set the RC to the Highest RC if 4 then if we set greater than 4.. the job will take the Highest retrun code that we set newly... rite..
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Mon Apr 23, 2007 4:02 pm
Reply with quote

hey,

Quote:
we can set the RC to the Highest RC if 4 then if we set greater than 4


R u saying that we can set the return-code to a bigger value so that the job will finally show the Ret-code set by us?? icon_confused.gif

What u said is correct, but that was not the requirement...

it was this

Quote:
i need to set the final return code to zero instead of MAXCC=04


and we are nowhere near that... icon_sad.gif
Back to top
View user's profile Send private message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Mon Apr 23, 2007 4:18 pm
Reply with quote

yes.. that is wat i have told.. we can set a MAX return code but not the less RC.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Mon Apr 23, 2007 5:35 pm
Reply with quote

Only the Kremlin can rewrite history.
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: Mon Apr 23, 2007 10:23 pm
Reply with quote

Hello,

If it has been posted, i've missed it - what is giving the RC=4?

Others have asked the following, but i'm not sure i know the answer - why does the RC need to be "reset to zero"?

A non-zero RC is not necessarily a bad condition. . . icon_confused.gif
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 run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top