File Allocation Parameters
During batch utility processing, one or more output files may be created depending upon the batch statement and options you use.
To create an output file, specify the file name and, optionally, parameters for attributes such as block size and processing mode. Usually only a few parameters are necessary to allocate a file, as shown in the following examples:
To create a new archive file on disk, allowing Optim to compute the space needed, and using site defaults for unit and volume information, specify:
ARCHIVE_FILE (DSNAME FOPUSER.NJCUST04)
The next example creates an external file, with a specified block size, volume assignment and space requirement. If the file name already exists, it will be deleted and reallocated.
EXTERNAL_FILE (DSNAME FOPUSER.CUSTOMER.NEWYORK
MODE REP VOLUME FOP003 BLKSIZE 8000
PRIMARY 100T SECONDARY 20T)
The parameters in this section should be used in any batch statement syntax where the words “File Allocation Parameters” appear.
type_FILE( { USEDD |DSNAME dsname }
[ MODE { REP | STOP | USE | GEND | GENT } ]
[ TAPE { YES | NO } FILENBR [ n ] ]
[ MGMTCLASS mgmtclass ]
[ STORCLASS storclass ]
[ DATACLASS dataclass ]
[ DSNTYPE {BASIC | LARGE | EXTREQ | EXTPREF} ]
[ EATTR { OPT | NO } ]
[ VOLUME volser ]
[ VOLCOUNT n ]
[ UNIT unit ]
[ PRIMARY n { C | T | K | M } ]
[ SECONDARY n { C | T | K | M } ]
[ BLKSIZE nnnn ] } )
Parameters must be enclosed in parentheses and may be in any order. DSNAME is always required. Multiple parameters can be specified on a single line.
File Type parameter
- type_FILE
- The file type parameter is required in the Archive, Extract, Deferred_Delete,
Insert, Convert or Compare statement and must precede any additional
parameters. Valid values are:
- ARCHIVE_FILE
- DUPE_ARCHIVE_FILE
- INDEX_FILE
- DUPE_INDEX_FILE
- COMPARE_FILE
- CONTROL_FILE
- CONVERTED_FILE
- EXTRACT_FILE
- EXTERNAL_FILE
- SUBSET_FILE
- USEDD
- Indicates that a DD statement is present in the JCL to define
the file. If you use the USEDD parameter, you cannot specify any other
file allocation parameters. The ddnames are:
- PSDFEXTR for archive and extract files
- PSDFCTRL for control files
- PSDFIDX for archive index files
- PSDFASUB for subset files
- DSNAME
- Fully qualified name of the file. You may specify the name of
a new or existing file.
- dsname
- The name of the file. If the file exists, you must use MODE REP or MODE USE.
- MODE
- Processing mode for the file. Allowable values are:
- REP
- Allocate the file unconditionally. If the file exists, delete and reallocate it.
- STOP
- Stop processing and display an error message if the file exists (default).
- USE
- Use the existing file. Data in the existing file will be overwritten. If the file does not exist, stop processing and display an error message.
- GEND (for archive files only)
- Generate the file name by appending the suffix “.Dyyymmdd”
to the DSNAME value, where yyy is the last 3 bytes
of the year. If this option is used, the maximum size of the DSNAME
parameter is 32 characters. Note: If you use this parameter and a file already exists containing the name to be suffixed, the existing file will not be deleted or renamed to include the suffix and may consequently be orphaned.
- GENT (for archive files only)
- Generate the file name by appending the suffix “.Dyymmdd.Hhhmm”
to the DSNAME value. If this option is used, the maximum size of the
DSNAME parameter is 26 characters. Note: If you use this parameter and a file already exists containing the name to be suffixed, the existing file will not be deleted or renamed to include the suffix and may consequently be orphaned.
- TAPE
- Indicator for tape file. This setting applies to archive files,
any duplicate archive files, and extract files.
- YES
- Assign the file to tape.
- NO
- Assign the file to disk (default).
- FILENBR
- The sequence of the file on the tape. If omitted, the default
value is 1.
- n
- File sequence number.
- MGMTCLASS
- The management class used to obtain data management information
to allocate the data set. If omitted, the installation default is
used.
- class
- The management class.
- STORCLASS
- The storage class used to obtain storage information to allocate
the data set. If omitted, the installation default is used.
- class
- The storage class.
- DATACLASS
- The data class used to obtain information to allocate the data
set. If omitted, the installation default is used.
- class
- The data class.
- DSNTYPE
- The data set name type, as defined by the Data Facility Storage
Management Subsystem (DFSMS) allocation documentation. Optim supports
both extended and large sequential data sets. Specify:
- BASIC
- An extended or large format sequential data set need not be allocated (default).
- LARGE
- A large format sequential data set is to be allocated. Cannot be specified for a Compare file.
- EXTREQ
- An extended data set is required.
- EXTPREF
- An extended data set is preferred.
- EATTR
- This is an optional parameter which allows you to specify an Extended attribute
for a file.
- NO
- Data set cannot have extended attributes or reside in EAS.
- OPT
- Data set can have extended attributes and reside in EAS.
- VOLUME
- The serial numbers of the volumes on which the file is to reside.
A maximum of six volsers are allowed. If more than one volser is specified,
the values must be enclosed in parentheses. If this parameter is omitted,
the operating system assigns a value.
- volser
- The volume serial number.
- VOLCOUNT
- The maximum number of volumes that may be assigned to this file.
If you specify this parameter, omit the VOLUME parameter. If you omit
VOLCOUNT, the VOLUME parameter controls the maximum number of volumes
assigned.
- nn
- The maximum number of volumes.
- UNIT
- The UNIT parameter used to allocate the data set. If omitted,
the site default is used. Omit this parameter for an index file.
- unit
- The unit type.
- PRIMARY
- The primary quantity of space to allocate in the indicated space
units. If omitted, Optim computes
a default space allocation. Note: For an archive or extract file, any unused space remaining after the job completes is automatically released.
- n
- The space allocation followed by the space unit. Valid space unit
values are:
- C
- for Cylinders
- T
- for Tracks
- K
- for Kilobytes
- M
- for Megabytes
- SECONDARY
- The secondary quantity of space to allocate in the indicated space units. If omitted, Optim computes a default space allocation. (The SECONDARY parameter has the same operands as the PRIMARY parameter.)
- BLKSIZE
- Specifies the block size to be used for the file. If omitted, Optim will calculate an appropriate
block size. For an archive file or an extract file, the minimum value
is 7944.
- nnnn
- The block size.
Allocating Image Copy Data Sets
To archive, extract or compare data from DB2 image copy data sets in multiple partitions of the same tablespace stored on the same tape volume, you must manually edit the JCL to allocate the data sets. Multiple image copy data sets cataloged on the same tape volume can not be allocated using dynamic allocation. This is a z/OS limitation. If you attempt to use dynamic allocation, the archive, extract, or compare process fails with a dynamic allocation error.
Table | Partition | Tape Allocation Requirement |
---|---|---|
SALES | TAPEVL1 - LABEL(1,SL) | // T01$0001 DD DISP=OLD,DSN=(dsname) IC Dataset for SALES Table |
CUSTOMER | PART1 TAPEVL1 - LABEL(2,SL) | // T02$0001 DD DISP=OLD,DSN=(dsname) IC Dataset for CUSTOMER Table Part #1 |
CUSTOMER | PART2 TAPEVL1 - LABEL(3,SL) | // T02$0002 DD DISP=OLD,DSN=(dsname) IC Dataset for CUSTOMER Table Part #2 |
CUSTOMER | PART3 TAPEVL1 - LABEL(4,SL) | // T02$0003 DD DISP=OLD,DSN=(dsname) IC Dataset for CUSTOMER Table Part #3 |
CUSTOMER | PART4 TAPEVL1 - LABEL(5,SL) | // T02$0004 DD DISP=OLD,DSN=(dsname) IC Dataset for CUSTOMER Table Part #4 |
CUSTOMER | PART5 TAPEVL1 - LABEL(6,SL) | // T02$0005 DD DISP=OLD,DSN=(dsname) IC Dataset for CUSTOMER Table Part #5 |
ORDERS | TAPEVL1 - LABEL(7,SL) | // T03$0001 DD DISP=OLD,DSN=(dsname) IC Dataset for ORDERS Table |
DETAILS | TAPEVL2 - LABEL(1,SL) | JCL allocation not required because it resides on a different tape |