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. Utilities
  4. IEBGENER

Copying Between Sequential Datasets and PDS Members Using IEBGENER

EXAMPLE 1:

Copying a PDS Member to a Sequential Dataset using IEBGENER

//IEBGENER JOB (12345),CLASS=A, MSGCLASS=X,NOTIFY=&SYSUID 
//STEP1 EXEC PGM=IEBGENER 
//SYSUT1 DD DSN=T12345.FILE1.PDS(MEMBER1), DISP=SHR 
//SYSUT2 DD DSN=T12345.FILE2.PS, DISP=SHR 
//SYSPRINT DD SYSOUT=* 
//SYSOUT DD SYSOUT=* 
//SYSIN DD DUMMY

Explanation:

  • EXEC Statement:

    • Executes the IEBGENER utility to copy data.

  • DD Statements:

    • SYSUT1 DD:

      • DSN=T12345.FILE1.PDS(MEMBER1): Specifies the input file as a PDS member (MEMBER1) from the PDS dataset (T12345.FILE1.PDS).

    • SYSUT2 DD:

      • DSN=T12345.FILE2.PS: Specifies the output dataset as a sequential (PS) dataset (T12345.FILE2.PS).

    • SYSPRINT DD:

      • Directs messages and logs to the system output (SYSOUT=*).

    • SYSOUT DD:

      • Directs general system output to standard system output (SYSOUT=*).

    This program uses IEBGENER to copy a specific member (MEMBER1) from a partitioned dataset (T12345.FILE1.PDS) to a sequential dataset (T12345.FILE2.PS). It reads the content of the PDS member from SYSUT1 and writes it to the sequential dataset specified in SYSUT2

EXAMPLE 2:

Copying a Sequential Dataset to a PDS Member

//IEBGENER JOB (12345),CLASS=A, MSGCLASS=X,NOTIFY=&SYSUID 
//STEP1 EXEC PGM=IEBGENER 
//SYSUT1 DD DSN=T12345.FILE1.PS, DISP=SHR
//SYSUT2 DD DSN=T12345.FILE2.PDS(MEMBER1), DISP=SHR
//SYSPRINT DD SYSOUT=* 
//SYSOUT DD SYSOUT=* 
//SYSIN DD DUMMY

Explanation:

  • EXEC Statement:

    • Executes the IEBGENER utility to copy data.

  • DD Statements:

    • SYSUT1 DD:

      • DSN=T12345.FILE1.PS: Specifies the name of the input dataset (T12345.FILE1.PS), which is a sequential dataset (PS).

    • SYSUT2 DD:

      • DSN=T12345.FILE2.PDS(MEMBER1): Specifies the output location as a PDS member (MEMBER1) in the partitioned dataset (T12345.FILE2.PDS).

    • SYSPRINT DD:

      • Directs informational messages and logs to system output (SYSOUT=*).

    • SYSOUT DD:

      • Handles general system output, also directed to the default system output (SYSOUT=*)

    This program uses the IEBGENER utility to copy data from a sequential dataset (T12345.FILE1.PS) to a member (MEMBER1) of a partitioned dataset (T12345.FILE2.PDS). It reads the content from the sequential dataset specified in SYSUT1 and writes it into the specified PDS member in SYSUT2

PreviousIEBGENERNextGenerate PDS member while copying

Last updated 1 month ago

Was this helpful?