Initialize a newly allocated data set (DATASET_INIT)
The DATASET_INIT function initializes a newly allocated (but not opened) non-VSAM data set by performing an OPEN/CLOSE sequence on it during step termination. The initialization causes a valid end-of-file mark to be written to the data set, eliminating the possibility of input/output errors or invalid data being read by programs that attempt to read the empty data set. The initialization process also causes space release (if coded in the JCL) to be driven for the new data set, which you might want for certain applications.
The DATASET_INIT keyword specifies whether to initialize the data set in question.
Syntax
DATASET_INIT=ENABLE|DISABLE
Operands
- ENABLE
- Perform data set initialization.
- DISABLE
- Do not perform data set initialization.
Usage and processing considerations
To use the DATASET_INIT function, add the Z1_INTERCEPT parameter to the Advanced Allocation Management OPTIONS member and set it to ENABLE.
For a data set to be eligible for initialization, the following criteria must be met:
- The data set must be non-VSAM.
- If the DSORG is coded in the JCL, it must be set to PS or PSU.
- The data set must have a volume that is assigned to it during allocation.
- The data set cannot be allocated to VIO.
- The data set must not be a zEDC compressed data set.
- If the step is ending normally, the normal disposition in the JCL cannot be DELETE - DISP=(x,DELETE,x).
- If the step is ending abnormally, the abnormal disposition in the JCL cannot be DELETE - DISP=(x,x,DELETE).
Default
DISABLE
Environments
UNALLOCATE
Example
In the following example, all newly allocated unopened data sets that match the required criteria and that are allocated by job ABC, are initialized:
RULE DEFINITIONS DEFAULTS * INCLUDE JOBNAME=ABC DATASET_INIT=ENABLE