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


Using SET and PROC symbols in DFSORT and ICETOOL statements

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

For jobs that directly invoke DFSORT (PGM=SORT or PGM=ICEMAN) or ICETOOL (PGM=ICETOOL), you can construct DFSORT symbols that incorporate JCL PROC or SET symbols as well as text and system symbols. You can then use those constructed DFSORT symbols in DFSORT and ICETOOL control statements in the same way you use regular DFSORT symbols.

As a simple example, if you wanted to use JCL SET symbols named XDSN and YDSN in a DFSORT statement, you could code the following:
// SET XDSN='X.DATA',YDSN='Y.DATA'
//S1 EXEC PGM=SORT,PARM='MSGDDN=MYOUT,JP1"&XDSN",JP2"&YDSN",LIST'
//MYOUT DD SYSOUT=*
...
//SYSIN DD *
  OPTION COPY
  OMIT COND=(1,44,CH,EQ,JP1,OR,1,44,CH,EQ,JP2)
/*
For each JPn"string" parameter found in EXEC PARM, a DFSORT symbol in the following form is constructed, and treated as if it was specified in the SYMNAMES data set (even if a SYMNAMES data set is not actually present):
JPn,S'string'

Up to ten symbols, JP0-JP9, can be set up this way.

For the previous example, the following DFSORT symbols are constructed and treated as if they were specified in SYMNAMES:
JP1,S'X.DATA'
JP2,S'Y.DATA'
These symbols are placed in the Symbol Table as:
JP1,C'X.DATA'  
JP2,C'Y.DATA'
When JP1 and JP2 are used in the OMIT statement, the statement is transformed to:
 OMIT COND=(1,44,CH,EQ,C'X.DATA',OR,1,44,CH,EQ,C'Y.DATA')
Here is another example using ICETOOL:
// SET VLSR1='339001'
// SET VLSR2='339002'
//S2 EXEC PGM=ICETOOL,
// PARM='JP0"Report for disks &VLSR1 and &VLSR2 on &WDAY"' 
... 
//TOOLIN DD * 
DISPLAY TITLE(JP0) - 
  FROM(IN) LIST(RPT) ON(5,4,CH)
The following DFSORT symbol is constructed:
JP0,S'Report for disks 339001 and 339002 on &WDAY'
If the job is run on Friday, 'FRI' is substituted for the &WDAY system symbol and the following is placed in the Symbol Table:
JP0,C'Report for disks 339001 and 339002 on FRI'
When JP0 is used in the DISPLAY statement, the statement is transformed to:
DISPLAY TITLE('Report for disks 339001 and 339002 on FRI')-
FROM(IN) LIST(OUT) ON(1,5,CH)
Note: For a JOINKEYS application, you can use JCL SET and PROC symbols (JPn) in DFSORT control statements for the main task, but you cannot use JCL SET and PROC symbols (JPn) in DFSORT control statements for the subtasks.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014