Modernization Hub

DS - Data Set

Enhanced Definition

A data set (DS) is the fundamental unit of data storage and organization in IBM z/OS, analogous to a file in other operating systems. It represents a collection of related records or data stored on a direct access storage device (DASD) or magnetic tape, managed by the operating system. Its primary purpose is to provide structured storage for programs, data, and system information. A data set (DS) is the fundamental unit of data storage and organization on IBM z/OS systems, representing a collection of related records or data stored on a direct access storage device (DASD) or tape. It is the mainframe equivalent of a file in other operating systems, managed by z/OS's data management facilities.

Key Characteristics

    • Data Set Organization (DSORG): Defines how records are structured and accessed. Common types include Physical Sequential (PS), Partitioned Organization (PO) for libraries, and Virtual Storage Access Method (VSAM) for indexed, relative, or entry-sequenced data.
    • Data Set Name (DSN): Each data set is identified by a unique, hierarchical name (e.g., HLQ.MID.LOW.NAME), which can be up to 44 characters long, including periods as delimiters.
    • Attributes: Defined by characteristics such as RECFM (record format - Fixed, Variable, Undefined), LRECL (logical record length), BLKSIZE (block size), and SPACE (allocation units like cylinders, tracks, or blocks).
    • Storage Location: Resides on physical storage devices, primarily DASD (e.g., IBM 3390 series) or magnetic tape volumes.
    • Access Methods: Managed and accessed via various access methods (e.g., QSAM, BSAM, VSAM, BPAM) which provide the interface for programs to read and write data.
    • Cataloging: Typically cataloged in the Integrated Catalog Facility (ICF) or VSAM User Catalogs to allow programs and users to refer to them by DSN without needing to know their physical volume or device.

Use Cases

    • Program Input/Output: Storing input data for COBOL, PL/I, or Assembler programs and receiving processed output data.
    • Source Code Libraries: Housing source code for applications (e.g., COBOL programs, JCL procedures) in Partitioned Data Sets (PDS) or Partitioned Data Set Extended (PDSE).
    • System Logs and Journals: Recording system events, transaction logs for CICS or IMS, or audit trails for compliance.
    • Database Storage: Serving as the underlying physical storage for DB2 table spaces, IMS databases, or VSAM files used by applications.
    • Temporary Storage: Utilized by utilities (e.g., SORT) or applications for intermediate results during job execution, often specified as DISP=(NEW,DELETE) in JCL.

Related Concepts

Data sets are central to z/OS operations and are intrinsically linked to JCL, access methods, and storage management. They are primarily defined and allocated using DD statements within JCL, which specify their name, organization, and attributes. Programs interact with data sets through various access methods that dictate how data is read and written. Furthermore, the Storage Management Subsystem (SMS) uses data classes, storage classes, and management classes to automate the allocation, placement, and lifecycle management of data sets based on predefined policies.

Best Practices:
  • Consistent Naming Conventions: Implement a clear, hierarchical DSN convention that reflects the data set's purpose, owner, and content to improve manageability and understanding.
  • Optimal Attribute Selection: Carefully choose RECFM, LRECL, BLKSIZE, and SPACE parameters to optimize storage utilization, I/O performance, and resource consumption for specific applications.
  • Cataloging Production Data Sets: Always catalog production and frequently accessed data sets to simplify JCL, ensure discoverability, and enable SMS management.
  • Leverage SMS: Utilize SMS (Storage Management Subsystem) to automate data set allocation, migration, backup, and retention policies, reducing manual effort and ensuring compliance.
  • Regular Cleanup and Monitoring: Periodically review and delete obsolete or temporary data sets to reclaim storage space and monitor data set growth to anticipate storage needs.

Related Vendors

IBM

646 products

Tone Software

14 products

Trax Softworks

3 products

Related Categories

Operating System

154 products

Automation

222 products

Browse and Edit

64 products