On Wed, Feb 22, 2017 at 12:32 PM, Paul Gilmartin <
0000000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> On Wed, 22 Feb 2017 09:26:58 -0800, John Mattson wrote:
>
> >Mr Poncelet is correct here.  While the old fashioned COND statements had
> a
> >funky syntax, there are some cases where they just work simpler.
> >See my example, below, which also presents a reasonable way to make sense
> >of the old syntax.
> >...
> >//STEP1A  EXEC PGM=WHATEVER,COND=(04,NE,STEP1)
> >//* IFF 4 is NE to the return code from STEP1 THEN Bypass this step
> >//*
> >//STEP1B  EXEC PGM=WHATEVER,COND=(00,NE,STEP1)
> >//* IFF 0 is NE to the return code from STEP1 THEN Bypass this step
> >
> > ...   There SHOULD be another test, basic
> >programming, test for ALL possible conditions whenever possible.
> >
> If only the designers (excuse me; perpetrators) of JCL had thought to
> provide an ELSEIF statement, they could have much simplified this
> (What century were they trained in?):
>

​I can't answer that, but it could be argued that it is not __absolutely__
necessary since the other constructs can emulate it, albeit ​clumsily

//IF1  IF ...
...
//   ELSE
//IF2  IF
...
//    ELSE
//IF3  IF
...
//ENDIF3 ENDIF
//ENDIF2 ENDIF
//ENDIF1 ENDIF



>
> //  IF (STEP1.COND EQ 4 ) THEN
> >//* IFF 4 is EQ to the return code from STEP1 THEN perform this step
> //*
> //  ELSEIF (STEP1.COND EQ 00) THEN
> //* IFF 0 is EQ to the return code from STEP1 THEN perform this step
> //*
> //  ELSE
> //* Handle unexpected RC in this step.
> //  ENDIF
>
> I hate JCL!
>

​I'm not a great fan of it myself. Of course, for some things I have
abandoned it for doing things using a REXX script (UNIX or TSO, depending)
or a UNIX shell, via Co:Z batch launcher.​ The main reason that I still use
JCL is CA-7 restart. I am not aware of _anything_ on the market which can
do something similar to this function for a REXX script or a UNIX shell
script. They need to be written with restart in mind at the application
level.



>
> RFE, anyone?
>
> -- gil
>
>

-- 
"Irrigation of the land with seawater desalinated by fusion power is
ancient. It's called 'rain'." -- Michael McClary, in alt.fusion

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to