Modernization Hub

Disposition

Final Status
Enhanced Definition

In z/OS JCL, the final disposition specifies the action the system should take with a dataset after the job step that used it completes. It dictates whether the dataset should be kept, deleted, cataloged, uncataloged, or passed to a subsequent step, managing its lifecycle post-execution. In z/OS, `DISP` (Disposition) is a Job Control Language (JCL) parameter used within a `DD` (Data Definition) statement to specify the status of a dataset at the beginning of a job step and the action to be taken with that dataset at the end of the job step. It is crucial for managing the lifecycle of datasets during batch processing. In JCL (Job Control Language), the `DISP` parameter specifies the disposition of a dataset, indicating its status at the beginning of a job step and defining the actions to be taken for that dataset upon normal or abnormal termination of the step. It is crucial for controlling how z/OS manages dataset existence, accessibility, and retention.

Key Characteristics

    • JCL Parameter: It is the second positional subparameter within the DISP parameter of a DD statement (e.g., DISP=(initial,final,abnormal)).
    • Post-Step Action: The specified action (e.g., KEEP, DELETE, CATLG, UNCATLG, PASS) is performed only *after* the job step that opened and used the dataset has finished execution.
    • Dataset Management: It is fundamental for automated dataset management, ensuring that temporary datasets are removed and permanent datasets are properly maintained within the z/OS environment.
    • Conditional Execution: An optional third subparameter allows specifying a different final disposition if the job step terminates abnormally (e.g., DISP=(NEW,CATLG,DELETE) means catalog on normal completion, delete on abnormal).
    • Impact on Catalog: CATLG adds a dataset entry to the system catalog, making it easily locatable by name, while UNCATLG removes it.
    • Temporary vs. Permanent: It differentiates how temporary work files (often DELETE) are handled versus permanent data files (often CATLG or KEEP).

Use Cases

    • Deleting Temporary Work Files: Automatically removing intermediate sort files or temporary datasets after their use with DISP=(NEW,DELETE).
    • Cataloging New Permanent Datasets: Adding a newly created master file or report output to the system catalog for future reference using DISP=(NEW,CATLG).
    • Retaining Existing Datasets: Keeping an existing dataset without modification to its catalog status after reading it, typically DISP=(OLD,KEEP) or DISP=(SHR,KEEP).
    • Passing Datasets Between Steps: Making a dataset available to a subsequent job step without explicitly cataloging it, using DISP=(NEW,PASS) or DISP=(OLD,PASS).
    • Uncataloging Obsolete Datasets: Removing an outdated dataset's entry from the catalog, often in conjunction with DELETE to free up storage.

Related Concepts

The final disposition is an integral part of the DD (Data Definition) statement in JCL, working in conjunction with the initial disposition (NEW, OLD, SHR, MOD) to define a dataset's complete lifecycle within a job. It directly interacts with the z/OS System Catalog when CATLG or UNCATLG is specified, impacting how Dataset Management Facilities (DMF) locate and manage data. It also influences Job Scheduling and Resource Management by ensuring that temporary storage is reclaimed and permanent storage is correctly maintained, preventing storage leaks or data loss.

Best Practices:
  • Always Specify Final Disposition: Explicitly define the final disposition for all datasets to prevent unintended data loss, unmanaged datasets, or storage accumulation.
  • Use DELETE for Temporary Datasets: For datasets created and used only within a job step or job, always specify DELETE as the final disposition to free up storage space.
  • Use CATLG for Permanent Datasets: For new datasets intended for long-term storage and future use by other jobs or applications, always CATLG them to ensure they are easily locatable by name.
  • Leverage Abnormal Disposition: For critical datasets, specify an abnormal disposition (e.g., DISP=(NEW,CATLG,DELETE)) to handle job failures gracefully, preventing partial or incorrect data from being cataloged.
  • Minimize PASS Usage: While PASS is efficient for sequential steps, avoid it for very long or complex jobs, as it can make debugging harder and is less robust than CATLG for permanent data.

Related Vendors

ASE

3 products

Tone Software

14 products

IBM

646 products

Applied Software

7 products

Trax Softworks

3 products

Related Categories

Automation

222 products

Operating System

154 products

Encryption

41 products

Files and Datasets

168 products

Browse and Edit

64 products