Jcl-lc-slides03-fp2005-ver1.0

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Jcl-lc-slides03-fp2005-ver1.0 as PDF for free.

More details

  • Words: 1,100
  • Pages: 23
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

Copyright © 2005, Infosys Technologies Ltd

2

ER/CORP/CRS/OS02/003 Version No: 1.0

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

Copyright © 2005, Infosys Technologies Ltd

3

ER/CORP/CRS/OS02/003 Version No: 1.0

VSAM DATASETS (Types)  KSDS Key Sequenced Data Sets 

ESDS Entry Sequenced Data Sets

 RRDS Relative Record Data Sets  LDS Linear Data Sets

Copyright © 2005, Infosys Technologies Ltd

4

ER/CORP/CRS/OS02/003 Version No: 1.0

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 Copyright © 2005, Infosys Technologies Ltd

5

ER/CORP/CRS/OS02/003 Version No: 1.0

VSAM DATASETS (KSDS - Key Sequenced Dataset) • Vsam stores records in the data component in units called control intervals(CI) Unused Space Control Field Record 1

Record 2

Record 3

Free space

CISZ ( CONTROL INTERVAL SIZE) Copyright © 2005, Infosys Technologies Ltd

6

ER/CORP/CRS/OS02/003 Version No: 1.0

(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)) /*

Copyright © 2005, Infosys Technologies Ltd

7

-

ER/CORP/CRS/OS02/003 Version No: 1.0

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) /*

Copyright © 2005, Infosys Technologies Ltd

8

ER/CORP/CRS/OS02/003 Version No: 1.0

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 /*

Copyright © 2005, Infosys Technologies Ltd

9

ER/CORP/CRS/OS02/003 Version No: 1.0

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 /*

Copyright © 2005, Infosys 10 Technologies Ltd

ER/CORP/CRS/OS02/003 Version No: 1.0

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

Processing of a GDG 1) Adding a new generation 2) Retaining the previous generation 3) Discarding the oldest generation

Copyright © 2005, Infosys 11 Technologies Ltd

ER/CORP/CRS/OS02/003 Version No: 1.0

Creating Generation Data Group 1) 2) 3)

Create a GDG Base Entry Create a GDG model data set label Create a Generation dataset model

Copyright © 2005, Infosys 12 Technologies Ltd

ER/CORP/CRS/OS02/003 Version No: 1.0

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) /*

Copyright © 2005, Infosys 13 Technologies Ltd

ER/CORP/CRS/OS02/003 Version No: 1.0

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

Copyright © 2005, Infosys 14 Technologies Ltd

ER/CORP/CRS/OS02/003 Version No: 1.0

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)

Copyright © 2005, Infosys 15 Technologies Ltd

ER/CORP/CRS/OS02/003 Version No: 1.0

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

Copyright © 2005, Infosys 16 Technologies Ltd

ER/CORP/CRS/OS02/003 Version No: 1.0

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 /* Copyright © 2005, Infosys 17 Technologies Ltd

ER/CORP/CRS/OS02/003 Version No: 1.0

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 /*

Copyright © 2005, Infosys 18 Technologies Ltd

ER/CORP/CRS/OS02/003 Version No: 1.0

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.

Copyright © 2005, Infosys 19 Technologies Ltd

ER/CORP/CRS/OS02/003 Version No: 1.0

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.

Copyright © 2005, Infosys 20 Technologies Ltd

ER/CORP/CRS/OS02/003 Version No: 1.0

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

Copyright © 2005, Infosys 21 Technologies Ltd

ER/CORP/CRS/OS02/003 Version No: 1.0

Review Questions ….  What is the limit on the maximum number of generations which can be kept for a GDG? 255

Copyright © 2005, Infosys 22 Technologies Ltd

ER/CORP/CRS/OS02/003 Version No: 1.0

Thank You! Copyright © 2005, Infosys 23 Technologies Ltd

ER/CORP/CRS/OS02/003 Version No: 1.0