In a recent note, Mark Carbaugh said:

> Subject:      IF/THEN/ELSE/ENDIF
> 
> Can anyone tell me why this does not work with out the START step?
> 
> //IFTHEN   JOB (999),'TEST JOB',
> //         CLASS=A,MSGCLASS=A,
> //         NOTIFY=MARKC
> //*
> // SET TEMP=04
> //START    EXEC PGM=IEFBR14
> //*
> //IFEQ01   IF (&TEMP = 01) THEN
> 
This question need be asked only because JCL developers
were irresponsible to an extent that strains the concept
of engineering ethics.

From:

  17.1.6 "z/OS V1R7.0 MVS JCL Reference"

  17.1.6 Location in the JCL

   An IF/THEN/ELSE/ENDIF statement construct can appear anywhere
   in the job after the first EXEC statement.

So, absent the START step, this rule is violated.  But no diagnostic
message is issued.  Not to report such an explicit error is
irresponsible.  And further:

    17.1.4.5 Relational-Expression Keywords

   The following keywords are the only keywords supported by IBM
   and recommended for use in relational-expressions.  Any other
   keywords, even if accepted by the system, are not intended or
   supported keywords.

   Keyword Use
   RC
          indicates a return code

   ABEND
          indicates an abend condition occurred

   ¬ABEND
          indicates no abend condition occurred

   ABENDCC
          indicates a system or user completion code

   RUN
          indicates that the specified step started execution

   ¬RUN
          indicates that the specified step did not start execution

Your intended relational-expression, "(&TEMP = 01)" does not
match any of  the forms in the list.  Again, not to report such
an explicit violation and weasel with words such as "even if
accepted" is irresponsible.

The JCL parser should report as an error any use by the programmer
of a constuct which is not "intended".  Or, perhaps better,
provide clearly specified and intuitive semantics for any
construct which is accepted.  For example, the RM states
(I paraphrase) that if the IF/THEN precedes the first EXEC
in the job, it does not apply to that first EXEC, but does
apply to the second and following contained EXECs.  I deem
this grossly contrary to intuition, or at least to experience
with other programming languages.

The JCL developers were lazy and irresponsible in not providing
diagnostic messages for constructs which are "not intended or
supported".

-- gil
-- 
StorageTek
INFORMATION made POWERFUL

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to