The following can accomplish the same thing without the need to write a custom program. This solution is entirely contained within the JCL:
//***************************************************** // SET HEX00=' ' <=== THIS IS A HEX ZERO CHARACTER // SET SYMBL='XYZ' //***************************************************** //* CHECK IF SYMBL=XYZ //***************************************************** //CKSYMBL EXEC PGM=IRXJCL,PARM='&HEX00 &SYMBL = XYZ ' //* PARM=' &SYMBL = XYZ ' //SYSEXEC DD * INTERPRET 'RETURN' ARG(1) //***************************************************** //* EXECUTE STEPS BASED ON VALUE OF SMBL1 //***************************************************** //IFXYZ IF (CKSYMBL.RC = 1) THEN //DOTRUE EXEC PGM=IEFBR14 //***************************************************** //ELSE ELSE //DOFALSE EXEC PGM=IEFBR14 //ENDIF ENDIF //***************************************************** In the event that you find the non-displayable character in the JCL objectionable, you can instead create a member in a sysexec lib that contains the one-line rexx program that is shown above as in-stream, change the SYSEXEC DD to point to that library and change the parm to replace the x'00' character with the member name. Of course that means that you are changing two components (the JCL and the new REXX pgm) instead of one. For those of us working for very large corporations with extreme controls of how/what can be place in production and the testing involved before that can be done, that may be a big concern. Bill Bass Applications Development Consultant United Healthcare Greenville, SC > -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:[email protected]] On Behalf Of John Gilmore > Sent: Wednesday, April 18, 2012 11:12 AM > To: [email protected] > Subject: Re: Execute certain steps based on input parm > > John Roberts has resolved your problem. You need a reusable > zero-th step that sets the return code. > > The PL/I procedure > > selstep: procedure(parm) options(main) reorder ; > > /* sets its return code equal to 1 if its parm value is 'first', > to 2 if its parm value is 'second', to 0 otherwise */ > > declare parm character(*) parameter nonassignable ; > > declare pcopy character(16), > retcode signed binary fixed(31,0) ; > > declare (first value('first') > character(5), > second value('second') > character(6), > (x1_retcode value(1), > x2_retcode value(2), > F0 value(0)) > signed binary fixed(31,0) ; > declare pliretc builtin ; > > pcopy = parm ; > select (pcopy) ; > when(first) retcode = x1_retcode ; > when(second) retcode = x2_retcode ; > otherwise retcode = F0 ; > end ; > call pliretc(retcode) ; /* set jobstep return code */ return ; > > end selstep ; > > does this (and would be easy to extend to choose one of three > jobs, etc., etc.); but you can write an analogue in C, even COBOL. > > John Gilmore, Ashland, MA 01721 - USA > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access > instructions, send email to [email protected] with the > message: INFO IBM-MAIN > This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN

