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