Here is the JCL (I have removed the code which isn't relevant to the problem)
//EXPO1 EXEC PROC=MWADVARC
//SYMNAMES DD *
STARTDAT,C'20120330'
ENDEDAT,C'20120605'
//SYMNOUT DD SYSOUT=*
//*
//EXPO2 EXEC PROC=MWADVARC
//SYMNAMES DD *
STARTDAT,C'88888888'
ENDEDAT,C'99999999'
//SYMNOUT DD SYSOUT=*
//*
Here is the Proc:
//MWADVARC PROC
//*****************************************************
//*
//MAKESET EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//*
//SETSDAT DD DSN=&&SETSDAT,
// DISP=(,PASS,DELETE),
// SPACE=(TRK,(1,0)),
// LRECL=255,RECFM=FB
//SETEDAT DD DSN=&&SETEDAT,
// DISP=(,PASS,DELETE),
// SPACE=(TRK,(1,0)),
// LRECL=255,RECFM=FB
//*
//TOOLIN DD *
COPY FROM(SYMNAMES) TO(SETSDAT) USING(CTL1)
COPY FROM(SYMNAMES) TO(SETEDAT) USING(CTL2)
//*
//CTL1CNTL DD *
OUTFIL FNAMES=SETSDAT,
STARTREC=001,ENDREC=001,
BUILD=(STARTDAT,255:X)
//*
//CTL2CNTL DD *
OUTFIL FNAMES=SETEDAT,
STARTREC=001,ENDREC=001,
BUILD=(ENDEDAT,255:X)
//*
//* DEBUG
//PRNTSETS EXEC PGM=IDCAMS
//DD1 DD DISP=(SHR,PASS),DSN=&&SETSDAT
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT INFILE(DD1)
//*
//* DEBUG
//PRNTSETE EXEC PGM=IDCAMS
//DD1 DD DISP=(SHR,PASS),DSN=&&SETEDAT
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT INFILE(DD1)
//*
Here is the SYMNOUT for the 2nd Step:
------- ORIGINAL STATEMENTS FROM SYMNAMES
STARTDAT,C'88888888'
ENDEDAT,C'99999999'
------------------ SYMBOL TABLE ----------
STARTDAT,C'88888888'
ENDEDAT,C'99999999' *
And the Print from the PRNTSETS for the 2nd Step:
So it seems that the Symboltable in the 2nd Step contains the new values, but I can't figure out why the &&SETSDAT has the old one.
Code'd