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
 

 

Setting Return code to Zero

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Setting Return code to Zero
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

Site Director


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

PostPosted: Fri Apr 13, 2007 9:08 pm    Post subject:
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    Post subject: Re: Setting Return code to Zero
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

Site Director


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

PostPosted: Fri Apr 20, 2007 5:45 am    Post subject:
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    Post subject: Re: Setting Return code to Zero
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 20, 2007 3:10 pm    Post subject:
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

Site Director


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

PostPosted: Sat Apr 21, 2007 1:52 am    Post subject:
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    Post subject: Re: Setting Return code to Zero
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

Site Director


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

PostPosted: Mon Apr 23, 2007 8:30 am    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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

Active Member


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

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

Only the Kremlin can rewrite history.
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: Mon Apr 23, 2007 10:23 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 3 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts DFHWS2LS return value divated CICS 4 Mon Nov 07, 2016 5:44 pm
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm


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