10/16/2015 3 er/corp/crs/os02/003-4 jcl day 4. 10/16/2015 4 er/corp/crs/os02/003-4 vsam datasets...

24
05/15/2 2 1 ER/CORP/CRS/OS02/003-4 JCL DAY 4

Upload: bernadette-sparks

Post on 01-Jan-2016

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 1

ER/CORP/CRS/OS02/003-4

JCL

DAY 4

Page 2: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 2

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

Page 3: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 3

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.

Page 4: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 4

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.

Page 5: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 5

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.

Page 6: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 6

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 )

Page 7: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 7

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 )

Page 8: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 8

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 1 Record 2 Record 3 Free space

Unused Space

Control Field

CISZ

( CONTROL INTERVAL SIZE)

Page 9: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 9

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

Page 10: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 10

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

Page 11: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 11

ER/CORP/CRS/OS02/003-4

(KSDS - Key Sequenced Dataset)(using repro)

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

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

Page 12: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 12

ER/CORP/CRS/OS02/003-4

(KSDS - Key Sequenced Dataset)(using listcat)

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

• LISTCAT gives you the catalog information of the cluster

Page 13: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 13

ER/CORP/CRS/OS02/003-4

(KSDS - Key Sequenced Dataset)(delete)

000100 //INF6244A JOB CLASS=A,NOTIFY=INF6244000200 //STEP1 EXEC PGM=IDCAMS 000300 //SYSPRINT DD SYSOUT=* 000400 //SYSIN DD * 000500 DELETE INF6244.VSAM.KSDS1 001106 /*

Page 14: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 14

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.

Page 15: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 15

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

Page 16: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 16

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

Page 17: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 17

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

Page 18: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 18

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)

Page 19: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 19

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

Page 20: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 20

ER/CORP/CRS/OS02/003-4

Deleting GDG Catalog Entries

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 a model

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

Page 21: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 21

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

Page 22: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 22

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.

Page 23: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 23

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.

Page 24: 10/16/2015 3 ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/2015 4 ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical

04/20/23 24

ER/CORP/CRS/OS02/003-4

That is the end of JCL course

Thank you