get return code based on value of symbolic parm



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

get return code based on value of symbolic parm

Postby rahul2005 » Tue Nov 13, 2012 2:28 pm

Hi,

My requirement is that , I have a JCL in which a variable is defined as
// SET VAR1=N0123456

Value of VAR1 is changing in every run of the job and it is always like N-------- or T-------

now i want to run some steps in this same JCL based on the value of VAR1 ,for example:- STEP3 will run if VAR1 has a value N------- and STEP4 will run if VAR1 has a value T------- .

somehow I want to set return code based on the above two conditions of VAR1 so that I can put COND on STEP3 and STEP4.

Can this be done in JCL? Maybe I can code REXX in a step to check value of VAR1 and get return code from that, but I dont know how, can you please show me a way through.
rahul2005
 
Posts: 1
Joined: Tue Nov 13, 2012 2:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: get return code based on value of symbolic parm

 

Re: get return code based on value of symbolic parm

Postby BillyBoyo » Tue Nov 13, 2012 3:01 pm

So know any Cobol? It is very simple to give your symbolic on a PARM to a Cobol program and for that program to test it and set the RETURN-CODE in the Cobol program, so it can be used in condition-code checking in the JCL.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: get return code based on value of symbolic parm

Postby NicC » Wed Nov 14, 2012 2:50 am

and if you code it properly you can use it for testing new JCL any old time - a bit like an IEFBR14 that takes a parm and does nothing but but give an RC of 0 to whatever and even do an abend.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post