z/OS DFSORT Application Programming Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example 2

z/OS DFSORT Application Programming Guide
SC23-6878-00

//  SET JOBNM='FRANK2'
//S1    EXEC  PGM=ICETOOL,
//  PARM=('JP1"&JOBNM"', 
//        'JP2"&JOBNM STEP"', 
//        'JP3"&JOBNM EXCPS"') 
//TOOLMSG DD SYSOUT=* 
//DFSMSG  DD SYSOUT=* 
//SYMNAMES DD * 
JOBN,5,8,CH 
STEPN,*,8,CH 
EXCPS,*,5,ZD 
//SYMNOUT DD SYSOUT=* 
//IN DD *
    FRANK2  S1      00008
    FRANK2  S2      00123
    FRANK2  S3      00023
    FRANK3  S1      00016
    FRANK3  S2      00152
/*
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS) 
//RPT DD SYSOUT=* 
//TOOLIN DD * 
COPY FROM(IN) TO(T1) USING(CTL1)
DISPLAY FROM(T1) LIST(RPT) BLANK -
 HEADER(JP2) ON(STEPN) -
 HEADER(JP3) ON(EXCPS)
/*
//CTL1CNTL DD *   
  INCLUDE COND=(JOBN,EQ,JP1) 
/*

This example illustrates how you can use a JCL SET symbol in ICETOOL and DFSORT control statements.

The JCL SET symbol is JOBNM which is set to a constant ('FRANK2' for this example).
//  PARM=('JP1"&JOBNM"', 
//        'JP2"&JOBNM STEP"', 
//        'JP3"&JOBNM EXCPS"')

is used to create DFSORT symbols named JP1, JP2 and JP3 containing strings including the JOBNM value. ICETOOL treats these JPn symbols as if they were specified before the Symbols in SYMNAMES.

The SYMNOUT listing will show the following:
------ SYMNAMES STATEMENTS FROM EXEC PARM -------
JP1,S'FRANK2'
JP2,S'FRANK2 STEP'
JP3,S'FRANK2 EXCPS'

------- ORIGINAL STATEMENTS FROM SYMNAMES -------
JOBN,5,8,CH
STEPN,*,8,CH
EXCPS,*,5,ZD

------------------ SYMBOL TABLE -----------------
JP1,C'FRANK2'
JP2,C'FRANK2 STEP'
JP3,C'FRANK2 EXCPS'
JOBN,5,8,CH
STEPN,13,8,CH
EXCPS,21,5,ZD
The DFSORT INCLUDE statement in CTL1CNTL uses the JOBN and JP1 symbols. It will be transformed to:
 INCLUDE COND=(5,8,CH,EQ,C'FRANK2')
The ICETOOL DISPLAY statement uses the JP2, JP3, STEPN and EXCPS symbols. It will be transformed to:
DISPLAY FROM(T1) LIST(RPT) BLANK-
HEADER('FRANK2 STEP') ON(13,8,CH)-
HEADER('FRANK2 EXCPS') ON(21,5,ZD)
RPT will contain the following report:
FRANK2 STEP   FRANK2 EXCPS
-----------   ------------
S1                       8
S2                     123
S3                      23

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014