Page 1 of 1

Passing SYMNAMES to the next Step

PostPosted: Fri Feb 01, 2013 2:20 am
by nawe
Hi
In the first Step I define some symbols in DD SYMNAMES. In the next Step in the same Job I define the same symbols with different contents. My Problem is that the procedure in the second Step uses the old contents of the symbols. Is this the way the SYMNAMES in ICETOOL works, that is, the symbol-table will be defined in the first step and I can't change the contents of the same symbols in later Steps ?

Re: Passing SYMNAMES to the next Step

PostPosted: Fri Feb 01, 2013 3:43 am
by enrico-sorichetti
Jour jcl is ... wrong
fix it!
the second step uses the fist step symnames because it uses ( jcl badly written ) the first step SYMNAMES dataset

but since You did not care to post the offending jcl, noo way for anybody to tell where You made the mistake :twisted:

Re: Passing SYMNAMES to the next Step

PostPosted: Fri Feb 01, 2013 1:47 pm
by nawe
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:
*20120330   
*                       

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

Re: Passing SYMNAMES to the next Step

PostPosted: Fri Feb 01, 2013 2:03 pm
by enrico-sorichetti
SYMNAMES is a reserved ddname
it looks weird to use it as a normal one ( input for this case )

anyway it is not clear what You are trying to do.

also good manners dictate that You use the available forum facilities
to make easier for people replying to understand what You post

for code fragments use the code tags they force the use of fixed pitch fonts

what You posted
//EXPO1 EXEC PROC=MWADVARC
//SYMNAMES DD *
STARTDAT,C'20120330'
ENDEDAT,C'20120605'
//SYMNOUT DD SYSOUT=*
...
...

how it would look properly formatted

//EXPO1 EXEC PROC=MWADVARC
//SYMNAMES DD *
STARTDAT,C'20120330'
ENDEDAT,C'20120605'
//SYMNOUT DD SYSOUT=*
...
...

Re: Passing SYMNAMES to the next Step

PostPosted: Fri Feb 01, 2013 5:53 pm
by nawe
It has something to do with the use of temp-files. When I replace them with normal files, which I delete at the end of the prodedure, I get the right results.

Re: Passing SYMNAMES to the next Step

PostPosted: Fri Feb 01, 2013 6:27 pm
by BillyBoyo
Can you tell us exactly what you are trying to do.

If you feel that your approach is already correct, post the sysout from the two ICETOOL steps and the jes messages for all the steps you have shown.