Modernization Hub

DD Card - Data Definition card

Enhanced Definition

A DD (Data Definition) card is a Job Control Language (JCL) statement used to define and describe data sets or other I/O resources required by a program within a specific job step on IBM z/OS. It acts as the crucial link between a program's logical file name (DDNAME) and the physical characteristics and location of the data or device it will access. A DD (Data Definition) card is a fundamental JCL (Job Control Language) statement in IBM z/OS that defines the characteristics and location of data sets or other I/O resources required by a program executing within a job step. It serves as the crucial link between a program's logical file name and the physical data set or device.

Key Characteristics

    • JCL Statement: It is a fundamental statement within JCL, following an EXEC statement and preceding other DD statements or the next EXEC statement.
    • Syntax: The general format is //ddname DD parameters, where ddname is the logical name referenced by the application program.
    • Resource Specification: Defines various I/O resources, including sequential data sets, VSAM data sets, PDS/PDSE members, temporary data sets, in-stream data, and SYSOUT (printer/spool output).
    • Parameters: Utilizes a wide array of parameters like DSN (data set name), DISP (disposition), UNIT (device type), VOL (volume serial), SPACE (allocation), DCB (data control block attributes), SYSOUT (output class), PATH (for USS files), etc.
    • Scope: The definitions provided by a DD card are valid only for the specific job step in which they are declared.
    • Dynamic Allocation: While traditionally static in JCL, DD cards can also be dynamically allocated by programs using SVC 99 (DYNALLOC) or through utility programs.

Use Cases

    • Allocating New Data Sets: Creating a new sequential or partitioned data set for program output, specifying its size, record format, and block size.
    • Referencing Existing Data Sets: Providing an application program access to an existing VSAM KSDS, sequential file, or PDS member for input or update.
    • Directing Output to Spool: Sending program reports or log files to the z/OS spool for printing or viewing, typically using SYSOUT=* or a specific SYSOUT class.
    • Providing In-Stream Data: Supplying small amounts of input data directly within the JCL stream itself using DD * or DD DATA.
    • Defining Temporary Work Files: Creating temporary data sets for intermediate processing within a job step, which are automatically deleted at the end of the step or job.

Related Concepts

DD cards are intrinsically linked to JCL as they are the primary mechanism for resource allocation within a job step defined by an EXEC statement. They bridge the gap between application programs (e.g., COBOL, PL/I, Assembler) that refer to logical file names (DDNAMEs) and the actual data sets or devices on the z/OS system. The parameters on a DD card directly influence the DCB (Data Control Block) information used by the operating system and access methods to manage I/O operations for the associated data set.

Best Practices:
  • Meaningful DDNAMEs: Use descriptive ddnames that clearly indicate the purpose of the data set (e.g., INFILE, OUTRPT, WORK01).
  • Correct DISP Parameter: Always specify the appropriate DISP (Disposition) parameter (NEW, OLD, SHR, MOD) to correctly manage data set creation, access, and deletion, preventing data loss or integrity issues.
  • Temporary Data Sets: Utilize DSN=&&tempname for temporary data sets that are only needed for the duration of the job, ensuring they are automatically deleted.
  • Cataloged Data Sets: For cataloged data sets, omit UNIT and VOL parameters where possible, relying on the system catalog for location information to improve portability and reduce maintenance.
  • DCB Attributes: Explicitly define DCB attributes (LRECL, BLKSIZE, RECFM) on the DD card when creating new data sets, or ensure they are consistent with existing data sets or program expectations.

Related Vendors

IBM

646 products

Applied Software

7 products

Tone Software

14 products

Trax Softworks

3 products

Related Categories

Operating System

154 products

Encryption

41 products

Files and Datasets

168 products

Automation

222 products

Browse and Edit

64 products