10/16/ ER/CORP/CRS/OS02/003-4 JCL DAY 4
10/16/ ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical dataset 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
10/16/ ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) VSAM is a High performance access method and data set Organization. Provides data security and Integrity. Shares Buffers and control blocks among VSAM data sets.
10/16/ ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) TYPES OF VSAM Data sets. Key sequenced Datasets. Entry sequence Data sets. Relative record data sets. Linear Data sets.
10/16/ ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) Key Sequence Data sets. Records are places in an ascending order. The key must be unique. The position of the key should be same in all records. Records can be retrieved either Randomly or Sequentially.
10/16/ ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) Entry Sequence Data sets. Records are either placed or accessed in the order of their entry. Records are sequentially accessed or by RBA concept. ( RBA – Relative Byte address )
10/16/ ER/CORP/CRS/OS02/003-4 VSAM DATASETS Relative Record Data sets. ( RRDS ) Pre defined slots to accommodate the data. Each slot carries a Relative record number ( RRN ) with respect to the first record. Records are read with the help of the RRN. Records are sequentially accessed or by RBA concept. ( RBA – Relative Byte address )
10/16/ ER/CORP/CRS/OS02/003-4 VSAM DATASETS (KSDS - Key Sequenced Dataset) Vsam stores records in the data component in units called control intervals(CI) Record 1Record 2Record 3Free space Unused Space Control Field CISZ ( CONTROL INTERVAL SIZE)
10/16/ ER/CORP/CRS/OS02/003-4 VSAM UTILITY IDCAMS ( IDC Access Method Services ) The Functions of IDCAMS are as follows. Define Repro ( Copy ) List Print Verify Delete
10/16/ ER/CORP/CRS/OS02/003-4 (KSDS - Key Sequenced Dataset) DEFINE //INF6244A JOB CLASS=A,NOTIFY=INF //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE CLUSTER(NAME(ER24172.VSAM.KSDS1) INDEXED VOLUME(SMS008) RECSZ(80 80) TRACKS(1 1) KEYS(4 0) CISZ(4096) FREESPACE(3 3)) DATA (NAME(ER24172.VSAM.KSDS1.INDEX)) INDEX (NAME(ER24172.VSAM.KSDS1.DATA) ) /*
10/16/ ER/CORP/CRS/OS02/003-4 (KSDS - Key Sequenced Dataset) (using repro) //INF6244A JOB NOTIFY=INF //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO IDS(INF6244.INPUT.JCLPS1) ODS(INF6244.VSAM.KSDS1) /* REPRO is used to copy VSAM and non VSAM datasets.
10/16/ ER/CORP/CRS/OS02/003-4 (KSDS - Key Sequenced Dataset) (using listcat) //INF6244A JOB CLASS=A,NOTIFY=INF //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * LISTCAT ENTRY(INF6244.VSAM.KSDS1) ALL /* LISTCAT gives you the catalog information of the cluster
10/16/ ER/CORP/CRS/OS02/003-4 (KSDS - Key Sequenced Dataset) (delete) //INF6244A JOB CLASS=A,NOTIFY=INF //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE INF6244.VSAM.KSDS /*
10/16/ ER/CORP/CRS/OS02/003-4 Generation Data Groups (GDGs) Processing of 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.
10/16/ ER/CORP/CRS/OS02/003-4 Creating Generation Data Group 1) Create a GDG Base Entry 2) Create a GDG model data set label 3) Create a Generation dataset model
10/16/ ER/CORP/CRS/OS02/003-4 Create GDG base entry Create an index for the GDG //INF62441 JOB (AMLAN),NOTIFY=INF6244,CLASS=A //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE GDG (NAME(INF6244.PAYROLL.VERSION) LIMIT(3) EMPTY SCRATCH) /*
10/16/ ER/CORP/CRS/OS02/003-4 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 GDS
10/16/ ER/CORP/CRS/OS02/003-4 Create DSCB //INF62441 JOB (AMLAN),NOTIFY=INF6244,CLASS=A //STEP1 EXEC PGM=IEFBR //DD1 DD DSN=INF6244.PAYROLL,DISP=(,KEEP), // SPACE=(TRK,(0)),VOL=SER=,UNIT=SYSDA, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
10/16/ ER/CORP/CRS/OS02/003-4 Create GDS (generation data set) //INF62441 JOB (AMLAN),NOTIFY=INF6244,CLASS=A //STEP1 EXEC PGM=IEFBR //DD1 DD DSN=INF6244.PAYROLL.VERSION(+1),DISP=(NEW,CATLG), // SPACE=(TRK,(1,1)),VOL=SER=,UNIT=SYSDA, // DCB=INF6244.PAYROLL
10/16/ ER/CORP/CRS/OS02/003-4 Deleting GDG Catalog Entries //INF62441 JOB (AMLAN),NOTIFY=INF6244,CLASS=A //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE INF6244.PAYROLL PURGE /* Delete a model Delete an allocated GDG and deletes all GDS’s //INF62441 JOB (AMLAN),NOTIFY=INF6244,CLASS=A //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE INF6244.PAYROLL.VERSION PURGE FORCE /*
10/16/ ER/CORP/CRS/OS02/003-4 Listing of GDG Catalog Information //INF62441 JOB (AMLAN),NOTIFY=INF6244,CLASS=A //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * LISTCAT GDG ENTRIES(INF6244.PAYROLL.VERSION)ALL /*
10/16/ ER/CORP/CRS/OS02/003-4 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.
10/16/ ER/CORP/CRS/OS02/003-4 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.
10/16/ ER/CORP/CRS/OS02/003-4 That is the end of JCL course Thank you