Yes, COND is ugly, unnatural and a booby trap for the unwary, but I never broke 
myself of the habit of using it. I would, however, want to train a newbie to 
understand it but to use IF/ELSE for new JCL.

Whether I string things together in JCL or in a REXX script depends very much 
on what I am trying to do, and the question of AND/OR logic on completion codes 
is pretty far down my list of considerations.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Steve Smith [sasd...@gmail.com]
Sent: Monday, May 24, 2021 6:37 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: JCL COND vs IF/THEN - Best catch up resources for MVS / ZOS 
Technologies

The problem I have with COND= is that it's back-asswards.  First, it
specifies conditions to NOT run the step.  You have to keep in mind that
with multiple conditions, any TRUE condition means don't run the step.
Except for ONLY & EVEN, which specify conditions for which the step *will*
run.  Second, the natural way to code a test is to say "if variable
[comparison] value", not the reverse that COND requires.

It's certainly possible to train yourself to grok that, but it's about as
unintuitive as it can be.  The IF / ELSE constructs are a great improvement
in understandability.  You can continue using the old way if you like, and
I don't see any argument that the new way causes any problems.  So what's
the complaint?

For the record, I use both COND and IF as I see fit, but if an OR or AND
rears its head, I'm likely to recast the whole thing into REXX.

sas

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

----------------------------------------------------------------------
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