One might hope that the behavior of symbol substitution in SYSIN
data sets would be identical to that in JCL statements, and even
similar to that of HLASM (except for the intentional blank
reduction/expansion to preserve column alignment).  However, from
the following JCL test:

    //  EXPORT SYMLIST=*
    //  SET X='This is a long symbol value.'
    //  SET USER=WOMBAT
    //*
    
//*.+....|....+....|....+....|....+....|....+....|....+....|....+....|....+....|
    //STEP0    EXEC  PGM=IEBGENER
    //SYSPRINT  DD  SYSOUT=(,)
    //SYSIN     DD  DUMMY
    //SYSUT2    DD  SYSOUT=(,)
    //SYSUT1    DD  *,SYMBOLS=CNVTSYS,DCB=LRECL=222
      DSN=&USER..FOO.BAR
      DSN=&&USER.FOO.BAR       Protective '&' not deleted.
      DSN=&UNDEFD.FOO.BAR      No substitution, but '.' deleted.
    //*
    //C1  EXEC  PGM=BPXBATCH,PARM='PGM /bin/echo DSN=&USER..FOO.BAR'
    //STDOUT  DD  SYSOUT=(,)
    //C2  EXEC  PGM=BPXBATCH,PARM='PGM /bin/echo DSN=&&USER.FOO.BAR'    '&' 
deleted.
    //STDOUT  DD  SYSOUT=(,)
    //C3  EXEC  PGM=BPXBATCH,PARM='PGM /bin/echo DSN=&UNDEFD.FOO.BAR'   '.' not 
deleted.
    //STDOUT  DD  SYSOUT=(,)

The IEBGENER step gives SYSOUT:
    ********************************* TOP OF DATA ******************
      DSN=WOMBAT.FOO.BAR
      DSN=&&USER.FOO.BAR       Protective '&' not deleted.
      DSN=&UNDEFDFOO.BAR       No substitution, but '.' deleted.
    ******************************** BOTTOM OF DATA ****************

Note that as in the comments the ampersand doubled to prevent
substitution is not reduced to a single ampersand, and that
even when no substitution is performed the lexically separating
period is removed.

Whereas the combined BPXBATCH PARM echo show:
    DSN=WOMBAT.FOO.BAR
    DSN=&USER.FOO.BAR
    DSN=&UNDEFD.FOO.BAR

... the doubled ampersand is reduced to one, and the period is
retained when no substitution occurs.

Are the differences between JCL substitution and SYSIN substitution
WAD or inadvertent?  If the latter, is it too late for them to be
repaired?

-- gil

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

Reply via email to