Passing SYMNAMES to the next Step



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Passing SYMNAMES to the next Step

Postby nawe » Fri Feb 01, 2013 2:20 am

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 ?
nawe
 
Posts: 3
Joined: Fri Feb 01, 2013 2:05 am
Has thanked: 0 time
Been thanked: 0 time

Re: Passing SYMNAMES to the next Step

Postby enrico-sorichetti » Fri Feb 01, 2013 3:43 am

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:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Passing SYMNAMES to the next Step

Postby nawe » Fri Feb 01, 2013 1:47 pm

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
nawe
 
Posts: 3
Joined: Fri Feb 01, 2013 2:05 am
Has thanked: 0 time
Been thanked: 0 time

Re: Passing SYMNAMES to the next Step

Postby enrico-sorichetti » Fri Feb 01, 2013 2:03 pm

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=*
...
...
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Passing SYMNAMES to the next Step

Postby nawe » Fri Feb 01, 2013 5:53 pm

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.
nawe
 
Posts: 3
Joined: Fri Feb 01, 2013 2:05 am
Has thanked: 0 time
Been thanked: 0 time

Re: Passing SYMNAMES to the next Step

Postby BillyBoyo » Fri Feb 01, 2013 6:27 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post