On Fri, 6 Nov 2015 14:31:21 -0800, Charles Mills wrote:

>Hmmm. JCL processing versus run-time? When does the SET V2= happen? When JES 
>reads the job in? I suspect so.
>
I believe not.  If that were the case, it would have the final value, XYZZY, in 
all steps.

>Or when it runs?
>
In fact, this example was distilled from a larger job in which symbols were
substituted in both a SYSIN and a DD PATH='.../&V2/...'  In the DD statements
the substitution was as if the substitution were performed logically, 
sequentially.
In the SYSIN the premature substitution occurred.

Where I noticed the behavior, the DD PATH= preceded the SYSIN.  I haven't
tried with the SYSIN preceding the DD PATH=.

>//*
>//  EXPORT SYMLIST=*
>//P     PROC
>//GEN   EXEC  PGM=IEBGENER
>//SYSPRINT  DD  SYSOUT=(,)
>//SYSIN     DD  DUMMY
>//SYSUT2    DD  SYSOUT=(,)
>//SYSUT1    DD  *,SYMBOLS=JCLONLY
>GENER step;
>  with V2=&V2..
>//P     PEND
>//*
>//  SET V2=WOMBAT  *************************************
>//WOMBAT1  EXEC P
>//WOMBAT2  EXEC P
>//  SET V2=XYZZY   *************************************
>//XYZZY1   EXEC P
>//XYZZY2   EXEC P
>//*

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to