On Wed, Feb 22, 2017 at 1:36 PM, Paul Gilmartin < [email protected]> wrote:
> On Wed, 22 Feb 2017 12:43:19 -0600, John McKown wrote: > > > >> 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 > > > No. Where would you code the DEFAULT/OTHERWISE clause? > >//IF1 IF ... ... // ELSE //IF2 IF ... // ELSE //IF3 IF ... //OTHRWISE ELSE ... //ENDIF3 ENDIF //ENDIF2 ENDIF //ENDIF2 ENDIR But I agree that // ELSIF or // ELSEIF would be superior. DEFAULT / OTHERWISE is simply after the last ELSE. Perhaps instead of // IF, IBM should have have // CASE? //SETRC EXEC PGM=SOMEPGM //CHKRC CASE // WHEN RC=0 THEN ... // WHEN RC=4 THEN .. // DEFAULT ... // ENDCASE CHKRC Where the CHKRC on the // ENDCASE is actually checked to match the label on the previous // CASE . > > And they missed an opportunity to provide far better error > checking by failing to require that label fields on corresponding > IF, THEN, ELSE, and ENDIF match. > Total agreement. > > -- 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 [email protected] with the message: INFO IBM-MAIN
