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

Understanding the JCL(Job Control Language)

If you're new to mainframe computing, Job Control Language (JCL) is a key skill you'll need. Think of it as the set of instructions you give the mainframe to execute specific tasks, like running programs or managing datasets. It doesn’t perform the calculations or logic itself but tells the system what to do, step by step. Whether you’re creating files, processing payroll data, or managing daily logs, JCL acts as the blueprint for the system to follow.

What is JCL and Why Is It Important?

JCL is short for Job Control Language. It’s the language used to communicate with IBM mainframe systems. Unlike general-purpose programming languages, JCL is specific to defining jobs a sequence of steps where each step performs a distinct function.

For example:

  1. Step 1: Read input data from a file.

  2. Step 2: Run a program to process the data.

  3. Step 3: Write the output to a new file.

Without JCL, mainframes wouldn’t know what tasks to perform, which resources to allocate, or where to store the results.

Breaking Down a JCL Job

Every JCL script is structured into three main sections:

  1. JOB Statement: Introduces the job to the system and specifies its overall parameters.

  2. EXEC Statement: Defines the program or procedure to run in each step.

  3. DD (Data Definition) Statements: Specify the datasets and system resources needed for each step.

Example:

//MYJOB JOB (12345,67890),'Demo Job',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID

//STEP1 EXEC PGM=IEFBR14

//MYDATA DD DSN=MY.TEST.FILE,DISP=(NEW,CATLG,DELETE),

// SPACE=(CYL,(5,5)),UNIT=SYSDA,LRECL=80,RECFM=FB

What’s Happening Here?

  1. The JOB Statement introduces the job and sets global parameters, such as:

  • CLASS=A: Assigns the job a priority.

  • MSGCLASS=X: Specifies where logs are sent.

  • NOTIFY=&SYSUID: Notifies the job submitter upon completion.

  1. The EXEC Statement

specifies that the IEFBR14 utility is being executed. This utility doesn’t do much other than allocate or delete datasets, but it’s commonly used for testing.

  1. The DD Statement defines a new dataset called MY.TEST.FILE

  • DISP=(NEW,CATLG,DELETE): Creates the dataset, catalogs it on success, and deletes it if the job fails.

  • SPACE=(CYL,(5,5)): Allocates space for the dataset in cylinders.

  • LRECL=80 and RECFM=FB: Define the record length and format.

PreviousJob Control Language and System Display and Search FacilityNextUnderstanding the JOB Statement

Last updated 5 months ago

Was this helpful?