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


Creating multiple versions/combinations of data sets

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

Table 1. Creating Multiple Versions/Combinations of Data Sets
Creating Multiple Versions/Combinations of Data SetsSample code
   * GROUP 1
     MODE CONTINUE
     COPY FROM(DATA1) TO(DATA2)
     COPY FROM(MSTR1) TO(MSTR2)
     SELECT FROM(DATA1) TO(SMALLDPT) ON(30,4,CH) LOWER(10)
     UNIQUE FROM(MSTR1) ON(30,4,CH)
   * GROUP 2
     MODE STOP
     COPY FROM(DATA1) TO(TEMP1) USING(NEW1)
     COPY FROM(DATA1) TO(TEMP2) USING(NEW2)
     COPY FROM(DATA1) TO(TEMP3) USING(NEW3)
     SORT FROM(CONCAT) TO(FINALD,FINALP) USING(FINL)
Assume that you specify DD statements with the following ddnames for the indicated data sets:
DATA1
A data set containing the name, salary, department, location, and so on, of each of your employees. The department field is in positions 30 through 33 in character format.
MSTR1
Master data set containing only the name and department of each of your employees. The department field is in positions 30 through 33 in character format.
DATA2, MSTR2, and SMALLDPT
Permanent data sets.
NEW1CNTL
A data set containing DFSORT control statements to INCLUDE employees in department X100 and change the records to match the format of MSTR1.
NEW2CNTL
Same as NEW1CNTL but for department X200.
NEW3CNTL
Same as NEW1CNTL but for department X300.
TEMP1, TEMP2, and TEMP3
Temporary data sets.
FINLCNTL
A data set containing a DFSORT control statement to sort by department and employee name.
CONCAT
A concatenation of the TEMP1, TEMP2, TEMP3, and MSTR1 data sets.
FINALD
A permanent data set.
FINALP
A SYSOUT data set.
You can use the ICETOOL operators in Table 1 to do the following:
MODE CONTINUE
If an error is found while processing any of the group 1 operators, subsequent group 1 operators are still processed; that is, group 1 operators are not dependent on the success of the previous group 1 operators.
COPY
The two copy operators create backup copies of DATA1 and MSTR1.
SELECT
Creates a permanent output data set containing the name, salary, department, location, and so on, of each employee in departments with less than 10 people.
UNIQUE
Prints a message in the TOOLMSG data set showing the number of unique departments.
MODE STOP
If an error is found while processing one of the group 2 operators, subsequent group 2 operators are not processed; that is, each group 2 operator is dependent on the success of previous group 2 operators.
COPY
The three COPY operators create an output data set for the employees in each department containing only name and department. Note that the ddname requested by the USING(xxxx) operand is xxxxCNTL. For example, USING(NEW1) requests ddname NEW1CNTL.
SORT
Sorts the three output data sets created by the COPY operators along with the master name/department data set and creates permanent and SYSOUT data sets containing the resulting sorted records.

You can combine both of these examples into a single ICETOOL job step.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014