On 11/06/2013 09:56 AM, Kirk Talman wrote:
> IBM Mainframe Discussion List <[email protected]> wrote on 
> 11/06/2013 10:32:09 AM:
> 
>> From: Paul Gilmartin <[email protected]>
> 
>> The "reverse logic of condition codes" probably was intuitive to an
>> assembler or FORTRAN programmer who thought of branching
>> around a statement.
> 
> I remember first seeing CCs in 1966 while in graduate school in physics 
> and thinking that somewhere there was a mathematician who understood this, 
> but humans would never.  My opinion has not changed in 47 years.  A 
> virtual beer to whoever thought up the JCL IF statement.
> 

As a former Assembler and FORTRAN programmer (and one with a mathematics
background), I can assert that COND was definitely not intuitive to us
either.  To me, a JCL keyword named "COND" should have implied the
conditions under which the step is executed.  If they wanted it to be
the conditions causing the step to be skipped a different name should
have been chosen, like "SKIPIF".  And then of course the relational
expression in COND is backwards.  A normal person wanting to know if a
prior CC was greater than 8 would never use reverse-think and require
the question be asked as whether 8 was less than the prior CC.

"COND" has always looked to me like a feature added as an after thought,
with the implementors choosing the syntax for their convenience, not
something designed with the user in mind.

I share your celebration of the IF Statement; although I have been bit
on one occasion by a non-intuitive behavior of IF statements as well:
the first EXEC in a JOB is always unconditionally executed no matter
what (which precludes using SET symbols and a leading IF to control
selective skipping of the first step, which seems a reasonable thing to
try just based on syntax)

-- 
Joel C. Ewing,    Bentonville, AR       [email protected] 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to