JCL
Download
1 / 23

JCL - PowerPoint PPT Presentation


  • 106 Views
  • Uploaded on

JCL. Day 3. Agenda for Day 3. VSAM data sets Definition & Types Record Structure Commands for VSAM files Generation Data Groups Definition JCL’s for GDG’s Storage Management System Definition & requirements. VSAM DATASETS (virtual storage access method).

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' JCL' - richard-jefferson


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

JCL

Day 3


Agenda for day 3
Agenda for Day 3

  • VSAM data sets

    • Definition & Types

    • Record Structure

    • Commands for VSAM files

  • Generation Data Groups

    • Definition

    • JCL’s for GDG’s

  • Storage Management System

    • Definition & requirements


  • VSAM DATASETS

    (virtual storage access method)

    • These are the logical datasets for storing records and are known

      as clusters.

    • The term cluster is used because there are two components

      for many VSAM datasets that are :

    • Index component - which contains the index

    • Data component - which contains the actual data


    VSAM DATASETS (Types)

    • KSDS

      Key Sequenced Data Sets

    • ESDS

      Entry Sequenced Data Sets

    • RRDS

      Relative Record Data Sets

    • LDS

      Linear Data Sets


    VSAM DATASETS

    (KSDS - Key Sequenced Dataset)

    • These are datasets which are stored in the order of a key field.

    • The records can be accessed either sequentially or randomly

      by the record key.

    • in VSAM as discussed earlier keys are stored separately in

      an index and the record is accessed in two ways.

    • First the key in the index is located

    • Then on the basis of the information stored in the index

      for that particular key, the record is located


    VSAM DATASETS

    (KSDS - Key Sequenced Dataset)

    • Vsam stores records in the data component in

      units called control intervals(CI)

    Unused Space

    Control Field

    Record 2

    Record 3

    Free space

    Record 1

    CISZ

    ( CONTROL INTERVAL SIZE)


    (KSDS - Key Sequenced Dataset)

    //ER5077J JOB CLASS=A,NOTIFY=ER4857

    //STEP1 EXEC PGM=IDCAMS

    //SYSPRINT DD SYSOUT=*

    //SYSIN DD *

    DEFINE CLUSTER(NAME(ER5077.VSAM.KSDSFILE) -

    INDEXED -

    VOLUME(INUSR2) -

    RECSZ(80 80) -

    TRACKS(1 1) -

    KEYS(4 0) -

    CISZ(4096) -

    FREESPACE(3 3)) -

    DATA -

    (NAME(ER5077.VSAM.KSDSFILE.DATA)) -

    INDEX -

    (NAME(ER5077.VSAM.KSDSFILE.INDEX))

    /*


    REPRO

    • REPRO is used to copy VSAM and non VSAM datasets.

    //ER5077J JOB NOTIFY=&SYSUID

    //STEP1 EXEC PGM=IDCAMS

    //SYSPRINT DD SYSOUT=*

    //SYSIN DD *

    REPRO –

    IDS(ER5077.INPUT.FORVSAM) –

    ODS(ER5077.VSAM.KSDSFILE)

    /*


    LISTCAT

    • LISTCAT gives you the catalog information of the cluster

    //ER5077J JOB ,,CLASS=A,NOTIFY=&SYSUID

    //STEP1 EXEC PGM=IDCAMS

    //SYSPRINT DD SYSOUT=*

    //SYSIN DD *

    LISTCAT ENTRY(ER5077.VSAM.KSDSFILE) ALL

    /*


    DELETE

    • DELETE gives you option to delete the data sets

    //ER5077J JOB ,,CLASS=A,NOTIFY=&SYSUID

    //STEP1 EXEC PGM=IDCAMS

    //SYSPRINT DD SYSOUT=*

    //SYSIN DD *

    DELETE ER5077.VSAM.KSDSFILE

    /*


    Generation data groups gdgs
    Generation Data Groups (GDGs)

    Processing of a GDG

    1) Adding a new generation

    • 2) Retaining the previous generation

    • 3) Discarding the oldest generation

    A Generation Data Group (GDG) is a group of chronologically or functionally related data sets.


    Creating Generation Data Group

    1) Create a GDG Base Entry

    • 2) Create a GDG model data set label

    • 3) Create a Generation dataset model


    Create gdg base entry
    Create GDG base entry

    Create an index for the GDG

    //ER5077J JOB ,,NOTIFY=&SYSUID,CLASS=A

    //STEP1 EXEC PGM=IDCAMS

    //SYSPRINT DD SYSOUT=*

    //SYSIN DD *

    DEFINE GDG -

    (NAME(ER5077.PAY.ROLL) -

    LIMIT(3) -

    EMPTY -

    SCRATCH)

    /*


    Creating a model dataset
    Creating a model dataset

    For Non SMS managed datasets, define a model dataset (DSCB) such that new GDG created will use prespecified parameters

    DSCB supplies the DCB &EXPDT subparameters for the GDG

    The model dataset must be cataloged

    It is linked to the GDG via a “DCB=model name” on creating new GDG’s


    Create dscb
    Create DSCB

    //ER5077J JOB ,,NOTIFY=&SYSUID,CLASS=A

    //STEP1 EXEC PGM=IEFBR14

    //DD1 DD DSN=ER5077.PAYROLL,DISP=(,KEEP),

    // SPACE=(TRK,(0)),VOL=SER=,UNIT=SYSDA,

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


    Create gds generation data set
    Create GDS(generation data set)

    //ER5077J JOB ,,NOTIFY=&SYSUID,CLASS=A

    //STEP1 EXEC PGM=IEFBR14

    //DD1 DD DSN=ER5077.PAY.ROLL (+1),

    // DISP=(NEW,CATLG),

    // SPACE=(TRK,(1,1)),

    // UNIT=SYSDA,

    // DCB=ER5077.PAYROLL


    Deleting gdg catalog entries
    Deleting GDG Catalog Entries

    • Delete a model

    //ER5077J JOB ,,NOTIFY=&SYSUID,CLASS=A

    //STEP1 EXEC PGM=IDCAMS

    //SYSPRINT DD SYSOUT=*

    //SYSIN DD *

    DELETE ER5077.PAYROLL PURGE

    /*

    • Delete an allocated GDG and deletes all GDS’s

    //ER5077J JOB ,,NOTIFY=&SYSUID,CLASS=A

    //STEP1 EXEC PGM=IDCAMS

    //SYSPRINT DD SYSOUT=*

    //SYSIN DD *

    DELETE ER5077J.PAY.ROLL PURGE FORCE

    /*


    Listing of gdg catalog information
    Listing of GDG Catalog Information

    //ER5077J JOB ,,NOTIFY=&SYSUID,CLASS=A

    //STEP1 EXEC PGM=IDCAMS

    //SYSPRINT DD SYSOUT=*

    //SYSIN DD *

    LISTCAT GDG ENTRIES(ER5077J.PAY.ROLL)ALL

    /*


    SMS

    (Storage Management Subsystem)

    • SMS is an optional feature of MVS.

    • It is a tool that is used to improve the management of available

      disk space.

    • Data sets created under SMS are known as SMS managed datasets .

    • PDS are known as PDSE when converted to SMS managed datasets

      can be done by IEBCOPY.

    Under SMS while creating a dataset you need to specify :

    - STORCLAS instead of UNIT

    - DATACLAS instead of DCB& SPACE

    - MGMTCLAS for migration of datasets.


    SMS

    (Storage Management Subsystem)

    • Generally, your existing JCL will continue to

      execute correctly.

    • SMS allows the installation to benefit from the data

      class, management class, and storage class constructs

      without changing existing JCL.

    • The installation-written ACS routines can be designed to

      filter existing parameters on the DD statement and select

      appropriate constructs for the data set.


    Review questions
    Review Questions

    • What are the different types of VSAM files?

      KSDS, ESDS, RRDS, LDS

    • VSAM stores records in the data component in units called _______

      Control intervals

    • When we are using GDG’s then what do following versions mean in a JCL? (-1), (+0) & (+1).

      -1 – Version of data set previous to current existing

      +0 – Current existing version of data set

      +1 – New version of data set getting created


    Review questions1
    Review Questions ….

    • What is the limit on the maximum number of generations which can be kept for a GDG?

      255