I would have preferred something like this instead of the delivered IF..THEN 
logic:

//S050   EXEC  WHATEVER,RUNIF=(RC,LE,4,S010)
                        RUNIF=(RC,8,S010)
                        RUNIF=(RUN,S020) 
                        RUNIF=(RUN,ANY)
                        RUNIF=(NOTRUN,S030)
                        RUNIF=(FLUSHED,S040)      
                        RUNIF=(JCLERROR,S040)      
..and in combinations as in COND.
etc.


 
Regards, 
Thomas Berg 
_________________________________________ 
Thomas Berg   Specialist   A M   SWEDBANK 

> -----Ursprungligt meddelande-----
> Från: IBM Mainframe Discussion List [mailto:[email protected]] För Paul
> Gilmartin
> Skickat: den 21 januari 2011 07:37
> Till: [email protected]
> Ämne: Re: If Else JCL question
> 
> On Fri, 21 Jan 2011 02:01:45 +0000, CM Poncelet <[email protected]>
> wrote:
> 
> >Any boolean tests can be performed with 'COND=', but not so with 'IF
> >ELSE etc.' We have already discussed this in the past.
> >
> Sorry; I missed that.
> 
> >But please show me how 'IF ELSE ...' handles the following:
> >
> >Execute STEPF if
> >- STEPA sets CC=04, STEPB sets CC=00, STEPC did not execute, STEPD sets
> >CC=08 and STEPE did not execute
> >or if
> >- STEPA sets CC=00, STEPB did not execute, STEPC sets CC=04, STEPD did
> >not execute and STEPE sets CC=00
> >or if
> >- STEPA did not execute, STEPB sets CC=00, STEPC sets CC=04, STEPD sets
> >CC=08 and STEPE sets either CC=04 or CC=08
> >otherwise do not execute STEPF.
> >
> OK:
> 
> //
> //IFELSE    JOB  505303JOB,'Paul Gilmartin',
> // MSGLEVEL=(1,1),REGION=0M
> //*
> //USERC    OUTPUT JESDS=ALL,DEFAULT=YES,
> //  CLASS=R,PAGEDEF=V0648Z,CHARS=GT12
> //*
> //STEPA  EXEC PGM=IEFBR14
> //STEPB  EXEC PGM=IEFBR14
> //STEPC  EXEC PGM=IEFBR14
> //STEPD  EXEC PGM=IEFBR14
> //STEPE  EXEC PGM=IEFBR14
> //TEST  IF ( STEPA.RC=04 & STEPB.RC=00 &                               x
> //           STEPC.RUN=FALSE & STEPD.RC=08 & STEPE.RUN=FALSE ) |       x
> //         ( STEPA.RC=00 & STEPB.RUN=FALSE &                           x
> //           STEPC.RC=04 & STEPD.RUN=FALSE & STEPE.RC=00 )  |          x
> //         ( STEPA.RUN=FALSE & STEPB.RC=00 &                           x
> //           STEPC.RC=04 & STEPD.RC=08 &                               x
> //             ( STEPE.RC=04 | STEPE.RC=08 ) )             THEN
> //STEPF  EXEC PGM=IEFBR14
> //TEST  ENDIF
> //
> 
>     :w ! submit
> 
> Tested; STEPA through STEPE execute; STEPF is skipped because
> of condiional expression.  I didn't check with truth table.  Also
> typos possible.
> 
> Now, kindly reciprocate and show me how this is coded with the
> COND parameter on the EXEC statement, please,
> 
> >'IF ELSE ...' is to 'COND=' as 'mouse' is to 'keyboard'.
> >
> I fail to see the analogy.
> 
> Thanks,
> gil
> 
> ----------------------------------------------------------------------
> 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

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