Mainframe Open Education Project
  • Welcome: Learn & Contribute to MOE
    • MOE Vision, Mission and Content Phases
    • Who Can Contribute?
    • Contributor Log In
    • Earn A Contributor Badge
    • MOE Management System
    • MOE Events
    • Project Support
    • Legal Disclaimer, Copyright and License
    • Code of Conduct
    • Project Governance
    • Why MOE
  • Introduction: What is Enterprise Computing?
  • Chapter 1: What is a Mainframe Today?
    • Role of the Mainframe Today
      • Mainframe and the Cloud
      • Enterprise Computing
      • Hybrid Cloud
    • Who Uses the Mainframe and Why
    • Mainframe versus Server
    • Mainframe Basic Architecture & Components
    • How the Mainframe Works
    • Mainframe Security Myths
    • Mainframe Evolution
    • Mainframe Modernization
    • Video: ITs Best Kept Secret
    • Get Ready: Talk Like a Mainframer
    • Looking Back: The First 50 Years of Mainframe
  • Chapter 2: Foundational Technology
    • Brief Introduction to z/OS
    • TSO/E, ISPF, and UNIX System Services (USS): Interactive facilities of z/OS
    • Data Sets and How They Work
    • Job Control Language and System Display and Search Facility
      • Understanding the JCL(Job Control Language)
        • Understanding the JOB Statement
        • Understanding the EXEC Statement
        • Understanding the DD Statement
        • Creating a Physical Sequential (PS)
        • Understanding Libraries in JCL
        • Understanding Instream Procedures, Cataloged Procedures, and Symbolic Parameters in JCL
      • Utilities
        • IEBCOMPR
        • IEBGENER
          • Copying Between Sequential Datasets and PDS Members Using IEBGENER
          • Generate PDS member while copying
          • Copying a UNIX File to a PS File
        • IEBCOPY
          • IEBCOPY selective copy using select statements
          • IEBCOPY Exclude members while copying
          • IEBCOPY renaming member while copying
      • GDG
        • GDG parameters
        • GDG base
        • GDG Generation
          • Referencing GDG Generations Using Relative Numbers
        • Alter and Delete GDG
    • Enterprise Software Development and Implementation
    • Programming languages for Mainframe
    • Modern Application Management
    • Video: System Overview
    • Video: MVS Using Dynamic Allocations
    • Article: Red Hat OpenShift 4.7 on IBM Z Is a Game Changer for Container Orchestration and Managemen
    • IBM z16
  • Chapter 3: Roles in Mainframe
    • Roles and Categories
      • Category Definitions
  • Chapter 4: Deeper Dive in Role Chosen
    • IT Operations and System Support and Services
    • IT Business/Software Product Application Development and Support
    • IT Software Engineers
    • IT Architects
  • Chapter 5: Career Path Opportunities
    • Learning Programs
    • Job Opportunities
    • Career Event Calendar
    • Open to Hire
  • Mainframe Events and Conferences 2024
  • My Mainframe Journey: From Student to Professional
  • Backlog on Topics
  • Additional Community Resources
    • Communities
    • Courses, Tutorials, Manuals
    • Education Programs
    • IBM Mainframe Timeshare Services
  • Digital Certificate Badges
    • z/OS Mainframe Practitioner
  • Reviewer List
  • Modern Mainframe
    • What is a modern mainframe environment?
    • z/OSMF
      • What is z/OSMF?
      • Why it is important in a mainframe shop
      • z/OSMF Learning Materials
    • Zowe
Powered by GitBook
On this page

Was this helpful?

  1. Chapter 2: Foundational Technology
  2. Job Control Language and System Display and Search Facility
  3. Understanding the JCL(Job Control Language)

Understanding the DD Statement

Understanding the DD Statement

The DD (Data Definition) Statement defines the datasets used in the job. It links the program to the resources it needs, such as input files or temporary storage.

Syntax

//DDNAME DD DSN=data-set-name,DISP=disposition[,parameters]

Parameters

  1. DDNAME: The name used within the program to reference the dataset.

  2. DSN: The name of the dataset.

  3. DISP: Specifies how the dataset is handle.

    • SHR: Opens an existing dataset for shared access.

    • NEW: Creates a new dataset.

    • OLD: Indicates that the dataset already exists and will be overwritten during the job step. Additionally, no other job will have access to this dataset until the current job step is complete.

    • MOD: Specifies that the dataset already exists and allows new records to be appended to it, without overwriting the existing records.

    • CATLG: The dataset is retained with an entry in the system catalog

    • UNCATLG: Dataset is deleted from user and system catalog

    • DELETE: dataset is deleted from user and system catalog

    • PASS:Used for only normal end this is used when the dataset is to be passed and processed by the next job step in a jcl

  4. DCB(Data Control Block):

    • LRECL: Record length of the dataset

    • RECFM: Record format of the dataset such as FB(Fixed Block) or VB(Variable Block)

    • BLKSIZE: Block size of the dataset

    • DSORG: Dataset organization

    • SPACE: Specifies the space required for the dataset,

    • RLSE: Releases unused allocated space.

    • UNIT: Specifies what type of storage to use for the dataset. DASD(Direct Access Storage Device) or SYSDA

    • SYSOUT: Directs output to a specific location, such as the spool or printer.

    • SYSOUT=*: Sends output to the default spool

    • SYSOUT=X: Sends output to a specific output class

Example

//MYFILE DD DSN=MY.DATASET.NAME,

// DISP=(NEW,CATLG,DELETE),

// SPACE=(CYL,(10,5),RLSE),

// UNIT=SYSDA,

// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)

Explanation:

  1. DSN=MY.DATASET.NAME: Specifies the name of the dataset.

  2. DISP=(NEW, CATLG,DELETE): Creates a new dataset, catalogs it on success, and deletes it on failure.

  3. SPACE=(CYL,(10,5),RLSE): Allocates 10 cylinders initially, with 5 more as needed, and releases unused space.

  4. UNIT=SYSDA: Uses the default system storage device.

  5. DCB=(RECFM=FB,LRECL=80, BLKSIZE=800,DSORG=PO):

    • Records are fixed length.

    • Each record is 80 bytes long.

    • Each block contains 800 bytes of data.

    • DSORG=PO: Specifies a partitioned dataset (PDS).

PreviousUnderstanding the EXEC StatementNextCreating a Physical Sequential (PS)

Last updated 5 months ago

Was this helpful?