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

To convert the return code


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

New User


Joined: 13 Apr 2007
Posts: 59
Location: Chennai

PostPosted: Fri Oct 15, 2010 9:51 pm
Reply with quote

Hi,

I've a JCl which render a specific Return code (say XXXX) and fail in one of the business conditions. But I want to change this return code XXXX to 0004 or 0000 and make the job's status as successful run, only in this business condition. In all other conditions, let the job run and render the corresponding Return code.

Is there any option possible for this using an IF condition or so?

Thanks,
Reni
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Oct 15, 2010 9:53 pm
Reply with quote

How will you detect the business condition?
Back to top
View user's profile Send private message
guruji
Warnings : 1

New User


Joined: 13 Apr 2007
Posts: 59
Location: Chennai

PostPosted: Fri Oct 15, 2010 9:56 pm
Reply with quote

Hi Akatsukami,

The return code will be XXXX only in this specific business condition and for that alone I need to set the job's MAXCC as 0004 or 0000, so that I need not manually complete the job.

The condition is nothing but having a member in one of the PDS's used in the jobstep.


Thanks,
Reni.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Oct 15, 2010 10:26 pm
Reply with quote

the return code of each step is determined <returned> by the program being executed
it cannot be changed in any other way

modify the programs involved in order to return the appropriate return code for what You call <business condition>
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Fri Oct 15, 2010 11:54 pm
Reply with quote

If you have job scheduling/tracking software it may be customisable to accept COND CODE XXXX as normal completion.

Also, you could insert a prior step to check for the member and set COND CODE 4 (flushing remaining steps).
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


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

PostPosted: Sat Oct 16, 2010 12:04 am
Reply with quote

Control-M can if I remember correctly even take actions depending on the RC's of specific jobsteps.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Oct 16, 2010 12:21 am
Reply with quote

my understanding is that the return code XXXX is an error,
according to some <business condition> it should be accepted as a valid/successful return code
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 Oct 16, 2010 1:19 am
Reply with quote

Hello,

Sounds like a "solution" that should be unacceptable. . .

If it is "bad" it is bad. If there is some condition that "trumps" the bad, the code should be changed to deal with the condition at that time - not gotten around later. When the step ends it should set a "bad" rc if there is a problem and a good rc when there is no problem.

Even if it means changing some special/sacred code. . . (At least from what has been posted so far).
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 Need to convert date format DFSORT/ICETOOL 20
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
Search our Forums:

Back to Top