VSAM Interview Questions and Answers
Q1. What is meant by using VSAM?
Ans: VSAM (Virtual Storage Access Method ) is an get entry to approach for IBM's mainframe operating machine, MVS, now known as z/OS. VSAM succeeded and increased upon an earlier IBM report get right of entry to approach, ISAM (Indexed Sequential Access Method).
Q2. What is the usage of trade index in VSAM?
Ans: VSAM - Alternate Index. Advertisements. Alternate index are the extra index that are created for KSDS/ESDS datasets further to their number one index. An alternate index provides get right of entry to to data with the aid of the usage of more than one key. The key of change index may be a non-unique key, it is able to have duplicates.
Q3. What is the usage of JCL in mainframe?
Ans: JCL (activity manage language) is a language for describing jobs (units of work) to the MVS, OS/390, and VSE running systems, which run on IBM's S/390 huge server (mainframe) computer systems. These working systems allocate their time and space sources some of the general range of jobs that have been began inside the pc.
Q4. What is the catalog?
Ans: The catalog includes the names of all datasets, VSAM and non-VSAM. It is used to get admission to these datasets.
Q5. What are the exceptional types of VSAM files available?
Ans: ESDS: Entry Sequence Data Set
KSDS: Key Sequence Data Set
RRDS: Relative Data Set
Q6. What is Control Interval, Control Area ?
Ans: Control Interval is analogous to a bodily block for QSAM documents. It is the unit of i/o. Must be between 512 bytes to 32 okay. Usually both 2K or 4K. A larger manipulate c programming language increases overall performance for sequential processing at the same time as the reverse is actual for random get entry to. Under CICS while a document is locked, the complete CI receives locked.
Control area is a collection of manage periods. CA is used at some stage in allocation. CA length is calculated based totally at the allocation kind (cyl, tracks or information) and may be max of 1 cylinder
Q7. What is Upgrade and Noupgrade alternative in Alternate Index?
Ans: UPGRADE specifies that the trade index need to be changed if the bottom cluster is changed and NOUPGRADE specifies that the trade indexes ought to be left alone if the base cluster is modified.
Q8. What is loose area?
Ans: Free space is reserved within the data factor of a KSDS to house insertion of recent facts.
Q9. What is the use of ALTER command in VSAM?
Ans: ALTER command is used to exchange maximum of the VSAM dataset attributes that had been particular even as defining VSAM cluster.
Q10. What does a document fame of 02 on a VSAM indicate?
Ans: Duplicate alternate key . Happens on each enter and output operation
Q11. How do you decide on most desirable values for CI, FREESPACE and so forth..?
Ans: CI length should be based totally on document duration, sort of processing. Usually CI is 4K. If report period is larger(>1K), chose 6K or 8K.
FREESPACE must be large if extra variety of insertions are envisaged. Usual values are (20 20) when heavy updates are predicted. CI length can be calculated.
Q12. Would you specify FREESPACE for an ESDS?
Ans: No. Because you can not insert facts in an ESDS, additionally whilst you rewrite a document, it need to be of the identical length. Thus setting any value for freespace does now not make any experience.
HubSpot Video
Q13. What is SHAREOPTS ?
Ans: SHAREOPTS is a parameter inside the DEFINE and specifies how an object can be shared amongst customers. It is coded as SHAREOPTS(a b), where a is the move area share choice ie how two or greater jobs on a single machine can percentage the record, even as b is the go machine percentage choice ie how or more jobs on exclusive MVSes can percentage the report. Usual fee is (2 3).
Q14. What happens whilst you open an empty VSAM file in a COBOL application for input?
Ans: A VSAM report that has in no way contained a document is dealt with as unavailable. Attempting to open for enter will fail. An empty file may be opened for output only. When you open for output, COBOL will write a dummy record to the file & then delete it out.
Q15. What are Unique Cluster?
Ans: Unique Clusters consists of a separate facts space which is utilized completely by using the cluster created within it. Unique clusters are created out of unallocated area on direct access garage.
Q16. What are Sub-allotted Clusters?
Ans: A sub-allocated VSAM file shares the VSAM space with different sub-allotted files. It specifies that report need to be sub-allotted within present VSAM space. Sub-allocation is used for less difficult management and manipulate of VSAM spaces.
Q17. How do you define a GDG ?
Ans: Use the DEFINE GENERATIONDATAGROUP command. In the same IDCAMS step, some other dataset have to 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 call of this model dataset have to be similar to that of the GDG, so use a disp of preserve in place of catlg and additionally specify area=(trk,0)
Q18. How do you calculate document size of an trade cluster? Give your values for both particular and non-precise.
Ans: Unique Case: 5 + ( alt-key-duration + primary-key )
Nonunique Case: five + ( alt-key-duration + n * primary-key )
in which n = # of duplicate records for the trade key
????Any one who is aware of - can you explain ?
Q19. What is the distinction among sequential documents and ESDS documents?
Sequential(QSAM) files may be created on tape even as ESDS files cannot.
Also, you may have ALTINDEX for an ESDS even as no such facility exists for QSAM files
Q20. What is IDCAMS ?
Ans: IDCAMS is the Access Method Services software. You run the IDCAMS software and supply AMS instructions through SYSIN. (examples of AMS instructions are DELETE, DEFINE, REPRO and many others..).
Q21. Can AMS instructions be run from the TSO set off ?
Ans: Yes
Q22. Syntax of AMS modal commands ?
Ans: Note: these may be used best under IDCAMS and now not from the TSO set off.
IF LASTCC(or MAXCC) >(or <,= and many others..) fee -
THEN -
DO -
command set (which include DELETE, DEFINE and many others..)
ELSE -
DO -
command set
LASTCC - Condition code from the remaining feature(such as delete) executed
MAXCC - Max circumstance code that changed into again via any of the prev capabilities
SET is likewise a valid AMS command. SET LASTCC (or MAXCC) = fee
The most circumstance code is 16. A cond code of 4 indicates a warning. A cond code of 8 is usually encountered on a DELETE of a dataset that is not gift.
Q23. Under IDCAMS , a couple of functions may be completed, each of which returns a cond code. What may be the circumstance code again to the running gadget ?
Ans: The maximum situation code generated is lower back because the condition code of the IDCAMS step.
