Mainframes 360
The one stop destination for System Z professionals

Sunday, July 26, 2009

Creating a New KSDS File


Q. What is IDCAMS Software? How do you run it?
The free IBM-Software Program IDCAMS is used to create, alter, load and delete VSAM Files. I am going to elaborate, on how you write a job to run the IDCAMS Software to create a new KSDS-File.

The IDCAMS Software expects you two supply two important files – //SYSPRINT File and //SYSIN File.

 Image357
The skeleton of the job, that you must write to run IDCAMS Software is shown in this picture.

Image358

To tell IDCAMS, what to do, you type Control Instructions or Commands, which IDCAMS Software understands in the //SYSIN DD File. Here are some of the commands, that you can issue to IDCAMS -
1. DEFINE Command to create a new Object.
2. ALTER Command to alter an existing Object.
3. DELETE Command to delete objects.
4. PRINT Command to Print the contents of an Object.
5. REPRO Command to take Backups.

You must understand, how to write the Control-Card which contains the Special-Instructions for IDCAMS Software.
Q. How do you write the Control-Card to create a new KSDS File?
You type the DEFINE CLUSTER Command to create a new KSDS File. The model or format of this Command is shown in the picture below.

Image359

You type IDCAMS Commands like DEFINE, ALTER, DELETE etc. beginning from
Column 03. Also, if the Command spans across several lines, you must put a continuation character '-' in Column 72.

NAME – The NAME Parameter specifies the name of the VSAM File to be created newly.
TRACKS – The space allocation of the VSAM File is in terms of Tracks. This says, my new VSAM File will occupy 10 Tracks of Primary Space, and shall grow by 10 Tracks of secondary, when full. You may specify CYLINDERS or RECORDS as well.
VOLUMES – The VOLUMES Parameter specifies one or more DASD Volumes on which the VSAM File may be created.
CONTROLINTERVALSIZE – The CISZ Parameter tells the size of the Control-Interval in the VSAM File in Bytes. Generally, you would skip off this, and let AMS decide the best CI Size. It defaults to 4096 Bytes.
ERASE or NOERASE – The ERASE Parameter specifies, that when the Cluster is Deleted, the space must be over-written with Binary Zeroes, prior to marking the space free for Re-use.
FREESPACE(ci ca) – FREESPACE Parameter specifies the percentage of space to be left unallocated for future expansion. If no FREESPACE is specified, the Control-Intervals will be filled upto the brim.
IMBED and REPLICATE – These options are now obsolete. IMBED specifies that the Sequence-Set Records are to be embedded with the Data in Data-Cluster. Without Embedding, the Sequence-Set Records are kept with the Index-Set Records in the Index Cluster.
KEYS(length offset) – This is used to tell the Key Column in the VSAM File. 3 is the length of the Key, and it is at a Displacement of 0 Bytes from the Column 1.
RECORDSIZE(avg max) – This tells average and Maximum length of the Logical-Reocrds in the VSAM File. For Fixed-Length records, avg=max.
INDEXED, NONINDEXED and NUMBERED – This tells the Type of Cluster – KSDS(Data is accessed using Key Value), ESDS(Data is accessed using RBA), and RRDS(Data is accessed using Relative Record Number) respectively.

To many people who are thrown to work at a mainframe computer on their first job, they feel lost. Mainframe people seem to speak a completely different language and that doesn't make life easy. What's more, the books and manuals are incredibly hard to comprehend.

"What on earth is a Mainframe?" is an absolute beginner's guide to mainframe computers. We'll introduce you to the hardware and peripherals. We'll talk about the operating system, the software installed on a mainframe. We'll also talk about the different people who work on a mainframe. In a nutshell, we'll de-mystify the mainframe.

Readers based in India, can buy the e-book for Rs. 50 only or the print book. International readers based in the US and other countries can click here to purchase the e-book.