| Q. How to create an empty KSDS VSAM Object using IDCAMS? | ||||||||||||||||||||||
| To work with VSAM Files, you need to use the IBM Supplied Utility program called IDCAMS. With IDCAMS, you can create an empty KSDS cluster, load VSAM KSDS Cluster with data, take a backup of KSDS, and perform other operations. Let us see a sample JCL that creates an empty KSDS Cluster. You need to use the DEFINE CLUSTER command to create a KSDS cluster. The different parameters of the KSDS Cluster are given as Instream control statements(DD *) to the IDCAMS program. The basic format of the IDCAMS Batch JOB/JCL is as follows-
Note: It is upto the system programmers to ensure that the necessary USER catalogs, and data space has been defined. Please check out with your shop, if this has already been done.
The DEFINE CLUSTER Command of IDCAMS is used to define a VSAM KSDS Cluster. The word INDEXED indicates that this is KSDS Cluster, since ESDS and RRDS don’t have Index component. The three main parameter lists that may be specified are : 1) CLUSTER (Parameters relating to the cluster as a whole) 2) DATA (Parameters relating to the DATA Component of KSDS) 3) INDEX (Parameters relating to the INDEX Component of KSDS) NAME Parameter : The NAME Parameter is used to specify the name of the cluster. So, the MVS O/S will refer to the KSDS Cluster in the above example as HERC04.DEMO.KSDS. When we will load data into the KSDS Cluster, we must write to HERC04.DEMO.KSDS. SPACE Allocation : We can specify how much space to allocate for the KSDS Cluster in terms of TRACKS, CYLINDERS, RECORDS, or VOLUMES. CONTROLINTERVALSIZE Option : We can also specify the Control Interval Size(CISZ) ranging from 512 bytes to 32,768 bytes. If it is between 512 bytes and 8,192 bytes, it should be a multiple of 512. On the other hand, if it is between 8,192 and 32,768 bytes in size, a multiple of 2,048 should be specified. By default the size of CI = 4096 bytes. ERASE Option : The ERASE Parameter specifies, that when you delete the cluster, the space occupied by the cluster should be zeroed out(written with binary zeros), and then declare the space as free for use. FREESPACE Option : The FREESPACE(CI CA) is used to specify, how much free space to leave in CIs and CAs. CI option tells how much space in a control interval should be left free for future inserts. CA option tells how much space in Control Area should be left free for new Control Intervals. REPLICATE and IMBED Option : REPLICATE means that the Index Record should be duplicated on a track as many times as possible. This was in order to avoid a rotational delay in seeking the Index record. The IMBED option means that Sequence Set should be on the first track of the cylinder. NOTE that these options have been leftover from the times, of classical DASD, i.e. when DASD Drives were slow. Nowadays, we have cached controllers and DASD devices are pretty much fast enough. KEYS Option : The KEYS Option specifies the Key field of the records in a KSDS Cluster. It has the following format. KEYS(length offset) length specifies the length of the key-field. offset specifies the position or column from where the key starts. So, if specify KEYS(5 10), it means the key-field length is 5 and it starts from position 10. Thus, the key-field will span the positions 10-14. RECORDSIZE option : The RECORDSIZE option can be used to specify the record length. It has the following format - RECORDSIZE(avg-length maximum) If the KSDS Cluster has same fixed length records, then avg-length and max-length are the same e.g. RECORDSIZE(80 80) specifies that all the records in this KSDS Cluster have same length 80. |
Bulletin Board
|
|
|
- I am writing articles on CICS. The effort would be to make the material of certain standard, practical and easy to comprehend. - JCL needs fresh look, and more weightage needs to assigned to conventions and practises adopted in Production Environments at most sites - A note of appreciation : Thanks to all our followers, for making Mainframes360 a success! |
Sunday, July 26, 2009
VSAM Tutorial 02 – Using IDCAMS Utility(Part II)
Technorati Tags: Mainframes,Mainframes360,IBM Mainframes,Quasar Chunawalla,VSAM,AMS,KSDS,Cluster,KSDS Cluster,VSAM File,VSAM KSDS,IDCAMS,IBM Utilities,VSAM Tutorial,JCL,DEFINE,DEFINE CLUSTER,Instream Control Statements,DD *,Master Catalog,User Catalog,NAME,DATA,INDEX,SPACE,TRACKS,Space Allocation,Control Interval Size,CISZ,ERASE,FREESPACE,REPLICATE,IMBED,KEYS,RECORDSIZE
Subscribe to:
Post Comments (Atom)
Note :
| © Copyright – Quasar Chunawalla, 2010.
Note : The copyrights of all the material, text and pictures posted in this website belong to the author. Any instance of lifting the material from this website, shall be considered as an act of plagiarism. For any clarifications, please mail at quasar.chunawalla@gmail.com |

0 comments:
Post a Comment