On Wed, 22 Jun 2005 19:14:17 -0700, Charles Mills <[EMAIL PROTECTED]> wrote:

>I got frustrated at the inability to test anything other than return
>codes the like with JCL IF.

This isn't quite as flexible as yours, but I got some JCL from a vendor that 
creatively inverted the usual way the test works.  They wanted to provide 
variables that the user could set to TRUE or FALSE to allow certain steps to 
execute or not.  So they started with something like:


//APLYPROC PROC SMC=TRUE,
//         HSC=FALSE,

which of course could be overridden by the user as desired.


Then the first step of the proc was

//TESTRUN  EXEC PGM=IEFBR14

Apparently, the only purpose of this step was to force TESTRUN.RUN to be true 
(RUN is a standard keyword that indicates that the specified step started 
execution)

Then they had subsequent steps like
//SMCTEST  IF (TESTRUN.RUN = &SMC) THEN

So they're not really testing the value of TESTRUN.RUN; they know it's true.  
They're checking to see whether SMC is true or false to determine whether to 
execute the next step.  An interesting way of twisting the provided function to 
do something different.

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