280 likes | 641 Views
JCL DAY 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.
E N D
JCL DAY 4 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 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. 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. 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. 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 ) 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 ) 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) Unused Space Control Field Record 1 Record 2 Record 3 Free space CISZ ( CONTROL INTERVAL SIZE) 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 ER/CORP/CRS/OS02/003-4
(KSDS - Key Sequenced Dataset) DEFINE 000100 //INF6244A JOB CLASS=A,NOTIFY=INF6244 000200 //STEP1 EXEC PGM=IDCAMS 000300 //SYSPRINT DD SYSOUT=* 000400 //SYSIN DD * 000500 DEFINE CLUSTER(NAME(ER24172.VSAM.KSDS1) - 000600 INDEXED - 000700 VOLUME(SMS008) - 000800 RECSZ(80 80) - 000900 TRACKS(1 1) - 001000 KEYS(4 0) - 001010 CISZ(4096) - 001100 FREESPACE(3 3)) - 001101 DATA - 001110 (NAME(ER24172.VSAM.KSDS1.INDEX)) - 001111 INDEX - 001120 (NAME(ER24172.VSAM.KSDS1.DATA) - 001200 ) 001700 /* ER/CORP/CRS/OS02/003-4
(KSDS - Key Sequenced Dataset) (using repro) • REPRO is used to copy VSAM and non VSAM datasets. 000100 //INF6244A JOB NOTIFY=INF6244 000200 //STEP1 EXEC PGM=IDCAMS 000300 //SYSPRINT DD SYSOUT=* 000400 //SYSIN DD * 000410 REPRO - 000500 IDS(INF6244.INPUT.JCLPS1) - 000600 ODS(INF6244.VSAM.KSDS1) 000700 /* ER/CORP/CRS/OS02/003-4
(KSDS - Key Sequenced Dataset) (using listcat) • LISTCAT gives you the catalog information of the cluster 000100 //INF6244A JOB CLASS=A,NOTIFY=INF6244 000200 //STEP1 EXEC PGM=IDCAMS 000300 //SYSPRINT DD SYSOUT=* 000400 //SYSIN DD * 000500 LISTCAT ENTRY(INF6244.VSAM.KSDS1) ALL 000600 /* ER/CORP/CRS/OS02/003-4
(KSDS - Key Sequenced Dataset) (delete) 000100 //INF6244A JOB CLASS=A,NOTIFY=INF6244 000200 //STEP1 EXEC PGM=IDCAMS 000300 //SYSPRINT DD SYSOUT=* 000400 //SYSIN DD * 000500 DELETE INF6244.VSAM.KSDS1 001106 /* ER/CORP/CRS/OS02/003-4
Generation Data Groups (GDGs) A Generation Data Group (GDG) is a group of chronologically or functionally related data sets. Processing of GDG 1) Adding a new generation • 2) Retaining the previous generation • 3) Discarding the oldest generation 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 ER/CORP/CRS/OS02/003-4
Create GDG base entry Create an index for the GDG 000100 //INF62441 JOB (AMLAN),NOTIFY=INF6244,CLASS=A 000200 //STEP1 EXEC PGM=IDCAMS 000300 //SYSPRINT DD SYSOUT=* 000400 //SYSIN DD * 000500 DEFINE GDG - 000600 (NAME(INF6244.PAYROLL.VERSION)- 000700 LIMIT(3)- 000800 EMPTY- 000900 SCRATCH) 001000 /* 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 ER/CORP/CRS/OS02/003-4
Create DSCB 000100 //INF62441 JOB (AMLAN),NOTIFY=INF6244,CLASS=A 000200 //STEP1 EXEC PGM=IEFBR14 000600 //DD1 DD DSN=INF6244.PAYROLL,DISP=(,KEEP), 000700 // SPACE=(TRK,(0)),VOL=SER=,UNIT=SYSDA, 000800 // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800) ER/CORP/CRS/OS02/003-4
Create GDS(generation data set) 000100 //INF62441 JOB (AMLAN),NOTIFY=INF6244,CLASS=A 000200 //STEP1 EXEC PGM=IEFBR14 000300 //DD1 DD DSN=INF6244.PAYROLL.VERSION(+1),DISP=(NEW,CATLG), 000400 // SPACE=(TRK,(1,1)),VOL=SER=,UNIT=SYSDA, 000500 // DCB=INF6244.PAYROLL ER/CORP/CRS/OS02/003-4
Deleting GDG Catalog Entries • Delete a model 000100 //INF62441 JOB (AMLAN),NOTIFY=INF6244,CLASS=A 000200 //STEP1 EXEC PGM=IDCAMS 000300 //SYSPRINT DD SYSOUT=* 000400 //SYSIN DD * 000500 DELETE INF6244.PAYROLL PURGE 000600 /* • Delete an allocated GDG and deletes all GDS’s 000100 //INF62441 JOB (AMLAN),NOTIFY=INF6244,CLASS=A 000200 //STEP1 EXEC PGM=IDCAMS 000300 //SYSPRINT DD SYSOUT=* 000400 //SYSIN DD * 000500 DELETE INF6244.PAYROLL.VERSION PURGE FORCE 000600 /* ER/CORP/CRS/OS02/003-4
Listing of GDG Catalog Information 000100 //INF62441 JOB (AMLAN),NOTIFY=INF6244,CLASS=A 000200 //STEP1 EXEC PGM=IDCAMS 000300 //SYSPRINT DD SYSOUT=* 000400 //SYSIN DD * 000500 LISTCAT GDG ENTRIES(INF6244.PAYROLL.VERSION)ALL 000600 /* 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. 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. ER/CORP/CRS/OS02/003-4
That is the end of JCL course Thank you ER/CORP/CRS/OS02/003-4