z/OS DFSORT: Getting Started
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Creating multiple identical copies

z/OS DFSORT: Getting Started
SC23-6880-00

Suppose you want to create backups for your data set; on disk for the local site and on tapes for the remote sites. You can do this by using OUTFIL and the FNAMES parameter with an OPTION COPY statement. The FNAMES parameter identifies the DD statements in your JCL for your output data sets by their DD names. Sample JCL and DFSORT control statements are as follows.

//COPY JOB A492,PROGRAMMER
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=A  
//SORTIN DD DSN=A123456.SORT.SAMPIN,DISP=SHR 
//BACKUP DD DSN=A123456.BOOKS.BACKUP,DISP=OLD
//NEWYORK DD DSN=BOOKS,UNIT=3490,DISP=(,KEEP),VOL=SER=REMOT1,LABEL=(,SL)
//SANJOSE DD DSN=BOOKS,UNIT=3490,DISP=(,KEEP),VOL=SER=REMOT2,LABEL=(,SL)
//SYSIN DD *
   OPTION COPY
   OUTFIL FNAMES=(BACKUP,NEWYORK,SANJOSE)
/*
Note: The previous JCL includes two tape data sets. Substitute your own tape data set information if you want to run this example.

Here are the steps for writing the OUTFIL statement:

Table 1. Creating the OUTFIL Statement for the Multiple Output Data Set Job
Step Action
1 Leave at least one blank and type OUTFIL
2 Leave at least one blank and type FNAMES=
3 Type, in parentheses and separated by commas, each output data set DD name. In this example, they are BACKUP, NEWYORK, and SANJOSE.

This OUTFIL statement creates three backup copies of your data set: one on-site disk data set, and two tapes that can be sent to remote sites.

You can also complete this task using the FILES parameter of OUTFIL. With FILES, you assign SORTOFd or SORTOFdd DD statements instead of naming unique DD statements. Sample JCL and DFSORT control statements using FILES are as follows.

//COPY JOB A492,PROGRAMMER
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=A
//SORTIN DD DSN=A123456.SORT.SAMPIN,DISP=SHR
//SORTOF1 DD DSN=A123456.BOOKS.BACKUP,DISP=OLD
//SORTOF2 DD DSN=BOOKS,UNIT=3490,DISP=(,KEEP),VOL=SER=REMOT1
//SORTOF3 DD DSN=BOOKS,UNIT=3490,DISP=(,KEEP),VOL=SER=REMOT2
//SYSIN DD *
   OPTION COPY
   OUTFIL FILES=(1,2,3)
/*

Both FNAMES and FILES create the same output, but FNAMES lets you use descriptive names of up to 8 characters for your OUTFIL DD statements instead of one or two cryptic suffix characters. FNAMES is recommended and is used in all of the multiple output examples in the rest of this chapter.

Note: If you do not specify a FNAMES or FILES parameter for an OUTFIL statement, the OUTFIL ddname is SORTOUT by default.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014