On 2018-01-30, at 08:36:29, Ward Able, Grant wrote:

> Previously posted to ISPL-List
>  
As answered on ISPF-L (I'll welcome any corrections):
    ...
And use a more imformative subject such as "JCL IF Statement".

>> -----Original Message-----
>> From: Ward Able, Grant
>> Sent: Tuesday, January 30, 2018 8:13 AM
>> 
>> Apologies for addressing this issue to the ISPF List - what would the correct
>> list be?
>> 
>> I have a situation where I need to execute a single JCL procedure, but ONLY
>> execute some steps (including the DSN allocations) for part B or part C,
>> depending on the return code of part A. The problem I seem to be stuck with
>> is that in part B (STEP10 below) I have some datasets defined in the JCL with
>> UNIT=SYSDA and VOL=SER=XXXXXX. However, if STEPA.RC is not 12, then we are
>> not executing in an environment where VOL=SER=XXXXXX is available/mounted. I
>> have been told that I need to have this whole job as a single unit, so it can
>> execute in the different environments as necessary.
>> 
An ENQ on any DSN mentioned will always be issued, regardless
of IF or COND.  Allocation will not be performed.

In JES2, data sets mentioned in steps skipped by IF or COND need not
exist and will not be created.

JES3 setup may require that even data sets mentioned in steps
skipped by IF or COND and their VOL and UNIT exist and are accessible.

>> //STEPA EXEC PGM=BLAHBLAH
>> // ...
>> // ...
>> //IFDR     IF (STEPA.RC = 12) THEN
>> //STEP10
>> // ...
>> //  ELSE
>> //STEP50
>> // ...
>> // ENDIF

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to