"Michael Knigge" <michael.kni...@set-software.de> wrote in message
news:<4a436732.2090...@set-software.de>...
> Roland,
> 
> > Not with YES/NO but like this 
> > Note: IEFBR14 always set RC0 
> 
> oh my god, that simple......
> 
> I always thought to myself, I could write a utility that just returns 
> (so do a "B R14") and set a RC that I've specified with a PARM 
> JCL-Statement (EXEC PGM=FOO,PARM='1' or something like that)
> 
> Your approach somehow the same, but much simplier....
> 
> 
> Thank you...
> 
> 
> Bye,
> Michael

We wrote some utilities that do useful checks and set the RC. 
It was initially used for COND statements in JCL, but can also be used
to conditionally execute JCL.

Count the number of lines in a dataset (to see if it is empty or
contains more than or no more than x lines):
//COUNT1 EXEC PGM=COUNT
//DSN     DD  DSN=report.dsn

//IF1     IF  (COUNT1.RC>0) THEN
  email the report 
//ENDIF1  ENDIF otherwise an empty email would be sent

Or:

Compare 2 values:
// SET ACTION=YES

//COMP1 EXEC PGM=COMP,PARM='&ACTION,YES,0,1'    if &ACTION=YES RC=0,
else RC=1

//IF1     IF  (COMP1.RC=0) THEN
// do things for ACTION
//ELSE1   ELSE
// do things for NOT ACTION
//ENDIF1  ENDIF

Kees.
**********************************************************************
For information, services and offers, please visit our web site:
http://www.klm.com. This e-mail and any attachment may contain
confidential and privileged material intended for the addressee
only. If you are not the addressee, you are notified that no part
of the e-mail or any attachment may be disclosed, copied or
distributed, and that any other action related to this e-mail or
attachment is strictly prohibited, and may be unlawful. If you have
received this e-mail by error, please notify the sender immediately
by return e-mail, and delete this message. 

Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries
and/or its employees shall not be liable for the incorrect or
incomplete transmission of this e-mail or any attachments, nor
responsible for any delay in receipt.
Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal
Dutch Airlines) is registered in Amstelveen, The Netherlands, with
registered number 33014286 
**********************************************************************

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

Reply via email to