I can confirm this behavior on V2.1, and I find it counter-intuitive as well.

Moving the SYSUT1 DD * and their input lines to the place where there are 
actual PROC executions does not change the behavior, the formulation below 
gives the same results as the first example.

Something's wrong for sure.

Peter

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

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Paul Gilmartin
Sent: Friday, November 06, 2015 5:17 PM
To: [email protected]
Subject: Premature SYMBOL substitution in SYSIN?

In the job fragment:

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

Dumping the SYSUT2s shows:

user@OS/390.24.00: head   *.GEN/*SYSUT2*                                        
                              
==> WOMBAT1.GEN/104.SYSUT2.text <==
GENER step;                                                                     
  with V2=WOMBAT.                                                               

==> WOMBAT2.GEN/106.SYSUT2.text <==
GENER step;                                                                     
  with V2=XYZZY.                                                   ?!?!?!?!?!?! 
            

==> XYZZY1.GEN/108.SYSUT2.text <==
GENER step;                                                                     
  with V2=XYZZY.                                                                

==> XYZZY2.GEN/110.SYSUT2.text <==
GENER step;                                                                     
  with V2=XYZZY.                                                                
user@OS/390.24.00: 

Why, in step WOMBAT2, is V2 substituted as XYZZY?  It should still have the 
value WOMBAT at that point.

-- 


This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


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

Reply via email to