Presentation is loading. Please wait.

Presentation is loading. Please wait.

JCL Day 3. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Agenda for Day 3  VSAM data sets  Definition & Types 

Similar presentations


Presentation on theme: "JCL Day 3. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Agenda for Day 3  VSAM data sets  Definition & Types "— Presentation transcript:

1 JCL Day 3

2 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 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

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

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

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

6 6 Copyright © 2005, Infosys Technologies Ltd 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) Record 1 Record 2Record 3Free space Unused Space Control Field CISZ ( CONTROL INTERVAL SIZE)

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

8 8 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 REPRO //ER5077J JOB NOTIFY=&SYSUID //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO – IDS(ER5077.INPUT.FORVSAM) – ODS(ER5077.VSAM.KSDSFILE) /* REPRO is used to copy VSAM and non VSAM datasets.

9 9 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 LISTCAT //ER5077J JOB,,CLASS=A,NOTIFY=&SYSUID //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * LISTCAT ENTRY(ER5077.VSAM.KSDSFILE) ALL /* LISTCAT gives you the catalog information of the cluster

10 10 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 DELETE //ER5077J JOB,,CLASS=A,NOTIFY=&SYSUID //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE ER5077.VSAM.KSDSFILE /* DELETE gives you option to delete the data sets

11 11 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 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.

12 12 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 1)Create a GDG Base Entry 2)Create a GDG model data set label 3)Create a Generation dataset model Creating Generation Data Group

13 13 Copyright © 2005, Infosys 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) /*

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

15 15 Copyright © 2005, Infosys 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)

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

17 17 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Deleting GDG Catalog Entries //ER5077J JOB,,NOTIFY=&SYSUID,CLASS=A //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE ER5077.PAYROLL PURGE /* Delete a model 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 /*

18 18 Copyright © 2005, Infosys 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 /*

19 19 Copyright © 2005, Infosys 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.

20 20 Copyright © 2005, Infosys 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.

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

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

23 23 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Thank You!


Download ppt "JCL Day 3. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Agenda for Day 3  VSAM data sets  Definition & Types "

Similar presentations


Ads by Google