Top IBM VSAM Interview Questions and answers: Here, we highlight some common questions you might be asked during a job interview for IBM related positions. All the best for your interview Preparation.
An alternate index is another file related to the cluster but sorted using an alternate key that can have duplicates. You use the IDCAMS utility with the DEFINE AIX option after you build the cluster and then do another IDCAMS with the BLDINDEX option to populate the alternate index. The RECORDSIZE parameter. There are 2 numbers that follow this: the 1st is the average and the 2nd is the maximum. The values are equal to 5 + (cluster key length) + N*(alternate key length), where N is the allowable number of duplicates. 00-OK 02-READ a duplicate alternate key 10-end of file reached while doing a READ 22-trying to WRITE a duplicate primary key 23-record not found while doing a READ 97-file integrity verified, do an IDCAMS VERIFY When large blocks of data are used, more main storage is required than when smaller blocks are used, but large blocks save CPU time and disk space. Additionally, extra buffers may save elapsed time since the program does not have to wait for an I/O to complete for it to continue processing. In the JCL, you specify BUFNI (number of index buffers) and BUFND (number of data buffers) as sub parameters of the AMP parameter. For random access, the BUFNI is one more than the number of index levels and a BUFND of 2 is fine. For sequential access, a BUFNI of 1 and a minimum of 5 for BUFND is fine. For dynamic access, the values of each is the higher of the numbers for either random or sequential. ESDS: Entry Sequence Data Set KSDS: Key Sequence Data Set RRDS: Relative Data Set IDCAMS is the Access Method Services program. You run the IDCAMS program and supply AMS commands thru SYSIN. (examples of AMS commands are DELETE, DEFINE, REPRO etc..) Control Interval is analogous to a physical block for QSAM files. It is the unit of i/o. Must be between 512 bytes to 32 k. Usually either 2K or 4K. A larger control interval increases performance for sequential processing while the reverse is true for random access. Under CICS when a record is locked, the entire CI gets locked. Control area is a group of control intervals. CA is used during allocation. CA size is calculated based on the allocation type (cyl, tracks or records) and can be max of 1 cylinder Coded in the DEFINE as FREESPACE (ci ca) where ci is the percentage of each control interval to be left free for insertions, ca is the percentage of control intervals in each control area to be left empty. CI size should be based on record length, type of processing. Usually CI is 4K. If record length is larger(>1K), choose 6K or 8K. FREE SPACE should be large if more number of insertions are envisaged. Usual values are (20 20) when heavy updates are expected. CI size can be calculated. No. Because you cannot insert records in an ESDS, also when you rewrite a record, it must be of the same length. Thus, putting any value for freespace does not make any sense. SHAREOPTS is a parameter in the DEFINE and specifies how an object can be shared among users. It is coded as SHAREOPTS(a b), where a is the cross region share option ie how two or more jobs on a single system can share the file, while b is the cross system share option ie how two or more jobs on different MVSes can share the file. Usual value is (2 3). Value of 2 for cross region means that the file can be processed simultaneously by multiple users provided only one of them is an updater. Value of 3 for cross system means that any number of jobs can process the file for input or output (VSAM does nothing to ensure integrity). DEFINE CLUSTER(cluster name) with the INDEXED parameter. Also specify the ds name for the DATA component & the ds INDEX component. Other important parms are RECORDSIZE, KEYS, SHARE OPTIONS. A VSAM file that has never contained a record is treated as unavailable. Attempting to open for input will fail. An empty file can be opened for output only. When you open for output, COBOL will write a dummy record to the file & then delete it out. Duplicate alternate key. Happens on both input and output operation Sequential(QSAM) files can be created on tape while ESDS files cannot. Also, you can have ALTINDEX for an ESDS while no such facility exists for QSAM files. Using the REPRO command. Use the DEFINE GENERATIONDATAGROUP command. In the same IDCAMS step, another dataset must be defined whose DCB parameters are used when new generations of the GDG are created. This dataset is known as the model dataset. The ds name of this model dataset must be the same as that of the GDG, so use a disp of keep rather than catlg and also specify space=(trk,0) base-file-name. GnnnnnV00 where nnnn= generation number (upto 255). nnnn will be 0000 for the 1st generation. IDCAMS is the Access Method Services program. You run the IDCAMS program and supply AMS commands thru SYSIN. (examples of AMS commands are DELETE, DEFINE, REPRO etc..). Control Interval is analogous to a physical block for QSAM files. It is the unit of i/o. Must be between 512 bytes to 32 k. Usually either 2K or 4K. A larger control interval increases performance for sequential processing while the reverse is true for random access. Under CICS when a record is locked, the entire CI gets locked. Control area is a group of control intervals. CA is used during allocation. CA size is calculated based on the allocation type (cyl, tracks or records) and can be max of 1 cylinder Coded in the DEFINE as FREESPACE (ci ca) where ci is the percentage of each control interval to be left free for insertions, ca is the percentage of control intervals in each control area to be left empty. SHAREOPTS is a parameter in the DEFINE and specifies how an object can be shared among users. It is coded as SHAREOPTS (a b), where a is the cross region share option ie how two or more jobs on a single system can share the file, while b is the cross system share option ie how two or more jobs on different MVSes can share the file. Usual value is (2 3). The File STATUS clause of the FILE-CONTROL paragraph allows for each file to be associated with a file status key (i.e., the 2-character data item specified in the FILE STATUS clause). If the FILE STATUS clause is specified for a given file, a value indicating the status of each I/O operation against that file is placed in the associated file status key. This value is stored in the file status key as soon as the I/O operation is completed (and before execution of any EXCEPTION/ERROR declarative or INVALID KEY/AT END phrase associated with the I/O request). Flat files are converted into VSAM files by following process: To re-sync the end of the file information with the catalog information, the VERIFY function is used. What is an alternate index?
How do you create an alternate index?
what parameter in the define AIX option is used to determine the maximum number of duplicate keys allowable?
Name a few common VSAM status codes?
What is buffering and how does it apply to VSAM files?
What are the different types of VSAM files available?
What is IDCAMS?
What is control interval, control area?
What is FREESPACE?
How do you decide on optimum values for CI, FREESPACE etc.?
Would you specify freespace for an ESDS?
What is shareopts?
What is the meaning of each of the values in shareopts(2 3)?
How do you define a KSDS ?
What happens when you open an empty vsam file in a cobol program for input?
What does a file status of 02 on a VSAM indicate?
What is the difference between Sequential files and ESDS files?
How do you load a VSAM data set with records?
How do you define a GDG?
How are different versions of GDG named?
What is IDCAMS?
What is control interval, control area?
What is Freespace?
What is Shareopts?
What is File Status in VSAM?
How do you convert flat files to VSAM files?
Explain the information contained in CI?
Difference between VSAM and database tables?
What is meant by dirty read in VSAM?
What is the purpose of the verify function oF IDCAMS?
Related posts:
- CICS Interview Questions and Answers
- Cognos Interview Questions and Answers
- IBM BPM Interview Questions and Answers
- IBM CGIDev2 Interview Questions and Answers
- IBM Cognos TM1 Interview Questions and Answers
- IBM Informix Interview Questions and Answers
- IBM Integration Bus Interview Questions and Answers
- IBM Rational ClearCase Interview Questions and Answers