DDNAME - Data Definition Name
A `DDNAME` (Data Definition Name) is a symbolic name used in JCL (Job Control Language) to refer to a specific data set or other I/O resource required by a program. It acts as a logical pointer, associating a program's internal file reference with an external physical data resource on the z/OS system.
Key Characteristics
-
- Symbolic Link: It's a symbolic name (1-8 characters, alphanumeric, first char A-Z or #, $, @) that a program uses to request access to data.
- JCL Statement: Defined within a
DD(Data Definition) statement in JCL, which specifies the actual physical characteristics and location of the data set (e.g.,DSN,DISP,UNIT,VOL). - Program-Defined: The
DDNAMEitself is often hardcoded or specified within the application program (e.g., in aSELECTstatement in COBOL or aDCBmacro in assembler) to identify the file. - Dynamic Allocation: While typically defined in JCL,
DDNAMEs can also be dynamically allocated by programs using SVC 99 (DYNALLOC) or TSO ALLOCATE commands, allowing for flexible resource assignment at runtime. - Scope: A
DDNAMEis typically unique within a single job step, but it can be referenced across steps if defined in aJOBLIBorSTEPLIBconcatenation, or if it refers to a temporary data set passed between steps. - Standard DDNAMEs: Certain
DDNAMEs have special meanings, such asSYSPRINTfor print output,SYSINfor input data, andSYSOUTfor system output.
Use Cases
-
- Batch Program Input/Output: Connecting a COBOL program's
SELECT ASSIGN TO DDNAMEstatement to aDDstatement in JCL that points to an input sequential file or an output report file. - Utility Program Parameters: Providing input to z/OS utilities like
IEBGENERorIDCAMSwhereSYSINis used for control statements andSYSPRINTfor messages. - Library Concatenation: Defining
STEPLIBorJOBLIBDDNAMEs to specify private program libraries that should be searched before system libraries for program execution. - Temporary Data Sets: Creating work files for sorting or intermediate processing using
DDNAMEs withDSN=&&TEMPDSNto manage temporary storage. - VSAM Data Set Access: Linking a program's
DDNAMEto aDDstatement that defines a VSAM KSDS, ESDS, or RRDS, including itsAMPparameters for performance tuning.
- Batch Program Input/Output: Connecting a COBOL program's
Related Concepts
A DDNAME is fundamental to JCL and program execution on z/OS. It bridges the gap between a program's logical file requests and the physical data sets managed by the operating system. It works in conjunction with the DD statement to provide the necessary parameters for data set access, and its resolution is handled by the Job Entry Subsystem (JES) and Data Management Services (DMS). DDNAMEs are crucial for COBOL SELECT statements, assembler DCBs, and C programs using fopen with DDNAME: prefixes, enabling applications to interact with the z/OS file system.