Showing posts with label VSAM-Interview. Show all posts
Showing posts with label VSAM-Interview. Show all posts

VSAM Interview Questions and Answers Collection

12/25/2009 No Comment

List of VSAM Interview Questions and Answers.

Dear Readers, we  have been gathered VSAM interview questions from different sources especially to get you acquainted with the  different kinds of questions you may be asked during your interview for VSAM File System. Hope you provide us your feedback and suggestions in the comment section.

CICS QuestionsJCL Questions
DB2 QuestionsCOBOL Questions
VSAM QuestionsIDMS Questions
IMS QuestionsMVS Questions

VSAM Interview Questions

VSAM Interview Questions and Answers

VSAM Interview Questions : Part 4

11/26/2009 No Comment

VSAM Questions for Beginners and Intermediate Level.

  1. Can you describe the process how are records stored in an ESDS, entry sequenced data-set in VSAM?
  2. Explain what do you mean by CI, control interval?
  3. Explain what is free space in VSAM?
  4. Is it necessary that primary key values have to be unique? Do alternate key values have to be unique in VSAM?
  5. In the COBOL SELECT statement, what is the ORGANIZATION for a KSDS?
  6. What is a path in VSAM?
  7. What is the upgrade set?
  8. In the COBOL SELECT statement for a KSDS what are the three possibilities for ACCESS in VSAM?
  9. Explain what is the purpose of the FILE STATUS clause in the SELECT statement in VSAM?
  10. If there is a need to use the REWRITE command haw must the VSAM file be opened?
  11. Explain the meaning and syntax for the START command.
  12. What is the utility program closely associated with VSAM?
  13. Can you explain in detail the seven IDCAMS commands?
  14. What do you mean by a catalog in VSAM?
  15. What is RECOVERY and SPEED parameters in DEFINE CLUSTER command ?
  16. Can you describe the SHAREOPTIONS parameter (SHR) in Define Cluster command in VSAM.
  17. Explain what is an alternate index? Provide Examples.
  18. What is a LDS (Linear Data Set ) and what is it used for in VSAM?
  19. Explain what do you mean by a cluster?
  20. What are the three levels of definition for the VSAM DEFINE?
  21. Explain what is the significance of the SHAREOPTIONS parameter in VSAM?
  22. What is the meaning of the DEFINE MODEL parameter?
  23. What is File Status in VSAM ?
  24. Under IDCAMS, multiple functions can be executed, each of which returns a condition code. What will be the condition code returned to the operating system ?
  25. Explain what is Control Interval, Control Area in VSAM?
  26. What is FREESPACE ?
  27. Describe the process of defining an ALTINDX ? How do you use ALTINDXs in batch, CICS program's ?
  28. What happens when you open an empty VSAM file in a COBOL program for input ?
  29. How do you initialize a VSAM file before any operation?
  30. Explain what is the meaning of each of the values in SHAREOPTS (2 3) in VSAM?
  31. Can you describe the process of calculating record size of an alternate cluster ? Please also provide values for both unique and non-unique.
  32. Explain what is the difference between sequential files and ESDS files in VSAM?
  33. Explain in brief how can you load a VSAM data set with records ?
  34. Describe the process of defining a GDG in VSAM?
  35. What is the device independent method to indicate where a Record is Stored ?
  36. How many times secondary space allocated in VSAM?
  37. How can you define a kSDS in VSAM?
  38. What does a file status of 02 on a VSAM indicate ?
  39. During processing of a VSAM file, some system error occurs and it is subsequently madeunusable. What do you do in VSAM?
  40. How do you fix the problem associated with VSAM out of space condition ?
  41. What is the meaning of VSAM RETURN-CODE 28 ?
  42. On which dataset You can have ALT INDEX ?
  43. What is IDCAMS ? and what is the purpose of it ?
  44. Explain how do you delete a member using JCL.
  45. Explain what is the difference between LDS and ESDS in VSAM?
  46. Is a delete operation possible in an ESDS? Also, is rewrite operation possible in ESDS  in VSAM?
  47. What is the RRN for the first record in RRDS ?
  48. How many Alternate Indexes you can have on a data-set in VSAM?
  49. Explain what are the optional parameters to the input data-set while loading the empty cluster with the data records ?
  50. Explain what is a Base Cluster in VSAM?

VSAM Interview Questions : Part 3

11/24/2009 No Comment

VSAM Interview prepared by Experts. 

The questions will help a job-seeker prepare for VSAM Interview.

  1. What do you mean by IDCAMS  in VSAM? Explain its purpose.
  2. How do you delete a member using JCL.Explain
  3. Is it slower if you access a record through ALT INDEX as compared to Primary INDEX ?
  4. Explain what is the difference between LDS and ESDS in VSAM?
  5. How is the procedure to decide on optimum values for CI, FREESPACE etc ?
  6. What is RECOVERY and SPEED parameters in DEFINE CLUSTER command ?
  7. What is the device independent method to indicate where a Record is Stored ?
  8. Can you tell me how many times secondary space be allocated in VSAM?
  9. What is the RRN for the first record in RRDS ?
  10. Can you run AMS commands from the TSO prompt ?
  11. If FSPC(100 100) is specified does it mean that both the control interval and control area will be left empty because 100 % of both CI and CA are specified to be empty ?
  12. What do you mean by a sequence set in VSAM?
  13. Explain in brief what are the optional parameters to the input data-set while loading the empty cluster with the data records ?
  14. What is a VSAM split? Explain with examples.
  15. What do you mean by base cluster? Explain its consequences.
  16. Describe the syntax of AMS modal commands in VSAM ?
  17. Would you specify FREESPACE CE for an ESDS ?
  18. What is the use of SHAREOPTS in VSAM?
  19. How are different versions of GDG named ?
  20. Can you explain what is IDCAMS in VSAM?
  21. Can you name some common VSAM error conditions and codes which frequently occurs in VSAM.
  22. What do you mean by VSAM-code field ?
  23. Can you tell me why in VSAM, we use export-import utility?
  24. What do you mean by a path in VSAM?
  25. What is the upgrade set?
  26. Explain what is a VSAM slot ?
  27. What are the types of VSAM datasets ? 
  28. Do all versions of the GDG have to be of the same record length ?
  29. What more info you should give in the DD statement while defining the next generation of a GDG ?
  30. Assuming that the DEFINE JCL is not available, how do you get info about a VSAM file's organisation ?
  31. Describe SHAREOPTIONS parameter (SHR) in Define Cluster command.
  32. What does the KEYRANGES parameter in Define Cluster commends do ?
  33. What do you mean by index set in VSAM?
  34. Explain what is a CA, control area?
  35. What is the meaning of dynamic processing in VSAM?
  36. What is the COBOL RECORD KEY clause?
  37. Explain what are the distinctive features of a KSDA, key sequenced dataset in VSAM?

VSAM Interview Questions : Part 2

11/22/2009 No Comment

Latest Mainframe VSAM Interview Questions.

  1. Explain what does a file status of 02 on a VSAM indicate ?
  2. What do you mean by an alternate index and path ?
  3. What do you mean by SHAREOPTS in VSAM ?
  4. How can you decide on optimum values for CI, FREESPACE in VSAM?
  5. What is the meaning of each of the values in SHAREOPTS (2 3) ?
  6. How can you define a kSDS in VSAM?
  7. How do you define an ALTINDX ? How do you use ALTINDXs in batch, CICS program's ?
  8. What happens when you open an empty VSAM file in a COBOL program for input ?
  9. How do you initialize a VSAM file before any operation ? a VSAM with alternate index ?
  10. How do you calculate record size of an alternate cluster ? Give your values for both unique and non-unique.
  11. Can you specify FREESPACE CE for an ESDS ?
  12. What more info you should give in the DD statement while defining the next generation of a GDG ?
  13. Explain what is the main difference between sequential files and ESDS files in VSAM?
  14. Let us consider a scenario.Suppose 3 generations of a GDG exist. How would you reference the 1st generation in the JCL ?
  15. Suppose a generation of GDG gets created in a particular step of a proc. How would you refer the current generation in a subsequent step ? What would be the disposition of this generation now ?
  16. Explain in brief what are the distinctive features of a KSDA, key sequenced data-set?
  17. During processing of a VSAM file, some system error occurs and it is subsequently unusable. What are the steps you would take ?
  18. Explain in brief about CA, control area in VSAM?
  19. Assuming that the DEFINE JCL is not available, how do you get info about a VSAM file's organisation ?
  20. What  do you mean by a CI, control interval in VSAM?
  21. How can you define a GDG in VSAM?
  22. How can you fix the problem that is associated with VSAM out of space condition ?
  23. Explain what is the meaning of VSAM RETURN-CODE 28 ?
  24. What does the KEYRANGES parameter in Define Cluster commends do ? 
  25. On which data-set, you can have ALT INDEX in VSAM?
  26. How many Alternate Indexes you can have on a data-set in VSAM?
  27. How do you load a VSAM data set with records ?
  28. Is it always slower if you try accessing a record through ALT INDEX as compared to Primary INDEX ?
  29. Is it required that all versions of the GDG have to be of the same record length ?
  30. Can you describe how are the different versions of GDG named in VSAM ?
  31. How many buffers are allotted to VSAM KSDS and ESDS ?
  32. Can you tell me what is the biggest disadvantage of using a VSAM data-set ?
  33. What are the different types of VSAM data-sets ? Explain with examples.
  34. Explain how are records stored in an ESDS, entry sequenced data-set?

VSAM Interview Questions : Part 1

11/20/2009 No Comment

VSAM Realtime Interview Questions. 

Please use the comment section to answer.

  1. Explain what do you mean by a sequence set?
  2. What do you mean by index set in VSAM?
  3. Explain how many buffers are allotted to VSAM KSDS and ESDS ?
  4. Can you describe some pf the main disadvantages of using a VSAM dataset ?
  5. What is free space? Explain how it is determined.
  6. What is the meaning of dynamic processing in VSAM? How do we achieve it?
  7. Name some common VSAM error conditions and codes.
  8. What do you mean by a VSAM split?
  9. Explain what is the base cluster in VSAM?
  10. Do primary key values have to be unique? Do alternate key values have to be unique?
  11. In the COBOL SELECT statement what is the ORGANIZATION for a KSDS?
  12. In the COBOL SELECT statement for a KSDS what are the three possibilities for ACCESS?
  13. What is the COBOL RECORD KEY clause?
  14. What is the main purpose of the FILE STATUS clause in the SELECT statement?
  15. If you wish to use the REWRITE command how hould the VSAM file be opened?
  16. Explain the meaning and syntax for the START command.
  17. What is the VSAM-code field ?
  18. What do you mean by a VSAM slot ?
  19. What is the utility program closely associated with VSAM?
  20. In VSAM we have about seven IDCAMS commands.Can you name them and explain each of them with examples?
  21. Explain what are the three levels of definition for the VSAM DEFINE?
  22. What is the main significance of the SHAREOPTIONS parameter in VSAM?
  23. Can you tell me what is the meaning of the DEFINE MODEL parameter? 
  24. What do you mean by File Status in VSAM ?
  25. What is a LDS (Linear Data Set )? Explain its usage.
  26. What do you mean by IDCAMS in VSAM?
  27. Can you run AMS commands from the TSO prompt ?
  28. Can you tell me the syntax of AMS modal commands in VSAM?
  29. Under IDCAMS, multiple functions can be executed, each of which returns a condition code. What will be the condition code returned to the operating system ?
  30. Explain what does the command FREESPACE do in VSAM ?

VSAM Interview Questions, FAQs and Answers

11/10/2009 No Comment

IBM Mainframe VSAM Interview Questions.

Collection of VSAM Interview Questions.

What do you mean by the REPRO command?
Answer : Whenever a new cluster is created using IDCAMS, the cluster will be empty. By the use of REPRO command, we are able to load records into the cluster. REPRO is used to:
  • Copy Datasets (VSAM or NON-VSAM), copy catalogs.
  • Conversion of sequential and index sequential Datasets to VSAM format.
  • Backup VSAM catalog
  • Conversion of VSAM and Index sequential Datasets to sequential format
  • Read a backup copy of VSAM catalogs.
What do you mean by RECOVERY and SPEED parameters in DEFINE CLUSTER command?
Answer : The parameters RECOVERY (default) and SPEED are mutually exclusive. Recovery is used to pre-format the control areas during the initial DataSet load, if the job fails, you can restart but you must have a recovery routine already written to restart the job. SPEED does not pre-format the CAs. It is advisable that you specify SPEED to speed up your initial data load.

Is it slower if you access a record through ALTERNATIVE INDEX as compared to Primary INDEX?

Answer : Yes it slower because the alternate Key would first locate the primary Key, which in turn locates the actual record. It requires twice the number of I/Os.

What do you mean by a SHAREOPTIONS parameter (SHR) in Define Cluster command?
Answer : It is used to define the cross-region and cross-system sharing capabilities of the DataSet. Syntax is SHR (CRvalue CSvalue)
  • 1 means multiple read OR single write (read integrity)
  • 2 means multiple read AND single write (Write integrity)
  • 3 means Multiple read AND multiple write
  • 4 is same as 3, which refreshes the buffer with every random access. Default is SHR (1 3).
Explain what are the optional parameters to the input DataSet while loading the empty cluster with the data records?
Answer : 
i) Skip and Count
Syntax:
SKIP(2)
COUNT(4)
In this case, the first two records are skipped and the next four records are printed. The
default for SKIP is 0, and for COUNT will be printing records from beginning to end.

ii) FromKey and ToKey
PRINT -
INDATASET (CUSTOMER.KSDS.CLUSTER) -
FROMKEY (111111) -
TOKEY (444444)
Will print all records with Key value ranging from 111111 to 444444.

iii) FROMADDRESS and TOADDRESS
iv) FROMNUMBER and TONUMBER

Is DELETE operation supported in an ESDS? Is rewrite operation possible in ESDS ?
Answer : The delete operation is not supported. Delete operation is not possible in VSAM ESDS. Yes, rewrite operation is possible in an ESDS.

Can you delete VSAM files with the DELETE option of the DISPOSITION parameter of JCL?

Answer : We cannot delete, you have to give a separate DELETE command in the VSAM cluster.

What do you mean by GDG in VSAM?

Answer : GDG means Generation Data Group.

Can you tell me what are the codes returned by the AMS (Access Method Services) command during the execution in VSAM?
Answer : Every AMS command issues a condition code. If multiple commands are being executed successively, there might be a requirement to execute or bypass certain commands on the Success or failure of a previous command.
The normal condition codes returned by AMS commands are :
0 - The function was executed successfully
4 - A problem was encountered while executing the function, WARNING
8 - The requested function was executed, but major specifies were unavoidably bypassed,
ERROR
12 - The requested command could not be performed because of a logical error, SEVERE
16 - A severe error occurred causing the remainder of the command stream to be
bypassed., FATAL.

Explain in brief how you can create a VSAM file ?

Answer : You use the IDCAMS utility with the DEFINE CLUSTER option.

How can you copy to a VSAM cluster ?
Answer : With the help of the IDCAMS utility with the REPRO option.

Can you tell me how many buffers are allocated to VSAM KSDS and ESDS?

Answer : There are 2 data buffers by default for ESDS. For KSDS it allots 2 data buffers and 1 index buffers. Each buffer is about 4k.

Explain in brief what are the 3 types of VSAM files ?
Answer : Below are the 3 types of VSAM files.
  • ESDS (Entry sequenced dataset). DB2 uses a special type of ESDS.
  • RRDS (Relative record dataset). Records are accessed using a relative number.
  • KSDS (Key sequenced dataset) is the most common type encountered. The record sequence is determined by a unique key field.

Mainframe VSAM Interview Questions and Answers

10/24/2009 No Comment

VSAM Interview Questions and Answers and Solutions.

Can you tell me whether in ESDS, do we have the facility of accessing the records randomly?
Answer : Yes, Random access of records is possible. However, records cannot be deleted. We have to do it by referring the RBA (relative byte address).

Explain in brief what is the difference between ESDS and KSDS in VSAM? 
Answer : ESDS doesn’t have imbedded free space.The KEYS parameter has no meaning in the context of ESDS. ESDS has no index component. An additional parameter, NONINDEXED is used to tell AMS that an SDS is being allocated.

Why is the space is kept in data component of the KSDS Dataset in VSAM?
Answer : Free space specified during the allocation of the KSDS is left at regular intervals during the initial load of the data set. This space helps in keeping the data component in physical sequence in spite of Random insertions.

Can you explain how is LDS different from ESDS in VSAM?

Answer : An LDS is a data set; very similar to an ESDS without the control information .It has no records and used for fast random access. It takes advantages of the computer’s very fast paging hardware for retrieval and storage and the bytes are implicitly divided into 4K blocks or pages, and the paging hardware reads and writes blocks from disk. There is no free space, unused space, control field in LDS.

What do you mean by CI, Control Interval in VSAM?
Answer : A Control Interval is the unit of information that VSAM transfers between virtual and auxiliary storage.

What do you mean by Control Interval Split?
Answer : A new record stored in same CI, only if there is enough space. If not VSAM locates the free CI within the same CA, moves approximately half of the records to next CI and stores the new record at the correct position. This is called Control Interval Split. Whenever CI split occurs the sequence set is updated.

What do you mean by a CA, control area? 
Answer : A group of Control Intervals makes up a control area.

What do you mean a sequence set?

Answer : Sequence Set is the part of the index that points to the CA and CI of the record being accessed.

Explain what is a cluster?

Answer : A VSAM cluster is the combination of the index, sequence set and data portions of the Dataset. The operating system gives program access to the cluster, i.e. to all parts of the Dataset simultaneously.

What is an alternate index in VSAM. Explain?
Answer : An AIX is a file that allows access to a VSAM Dataset by a Key other than the primary one. The Alternate Key-pointer pair records are stored in an index cluster. This index cluster is known as Alternate index. The alternate Key-pointer pair records are loaded into the alternate index cluster by the command BLDINDEX.AIX can be built over a KSDS and ESDS, but not over an RRDS.

What do you mean by a index set in VSAM?
Answer : This is the other part of the index. It has multiple levels with pointers that ultimately reach to the sequence set.

What do you man by a Catalog in VSAM?

Answer : The catalog contains the names of all Datasets, VSAM and non-VSAM. It is used to access these Datasets.

Can you tell me what could be the maximum number of the AIXs per base cluster?

Answer : There can be a maximum of 253 AIXs per base cluster. It is not recommended to have more than 5 AIXs per base cluster because of additional overhead during updates and retrievals.

Can AIX be defined over an ESDS, which does not have any Key?
Answer : Although an ESDS does not have a primary Key, an AIX can be defined over an ESDS. In the case of an ESDS it is the relative byte address of the corresponding record in the base cluster that is stored.

Can we access records in VSAM only by a single Key, i.e. primary Key?

Answer : Yes, it is also possible to access the records in a sequence other than that of the primary Key. Such Keys are called alternate Keys and they can be non-unique.

For Instance, in a pay-roll system where employee number is the unique primary Key and the Employee name as alternate Key.

What is the 'verify' command in the VSAM files?

Answer : This  is a command that is used to close those files that are kept open after the abnormal termination of the file. It also brings the index component in sync with the data components and updates the catalog in VSAM.

Explain what do you mean by a path?

Answer : A path is basically a file that allows you to access a file by an alternate index - the path provides an association between the AIX and the base cluster.

VSAM Interview Questions and Answers

10/07/2009 1 Comment

Mainframe VSAM Interview Questions and Answers.

Explain what do you mean by a upgrade set in VSAM?
Answer : The upgrade set is the list of all AIXs that VSAM must be maintaining for a specific base cluster, so that when data in the base cluster is modified or updated, the AIX files are also updated.

Explain what is a base cluster in VSAM?

Answer : The base cluster in VSAM consists of the data component as well as the index component that is required for the primary index of a KSDS.

In a COBOL SELECT statement, can you tell what is the ORGANIZATION for a KSDS?
Answer : For a KSDS, the ORGANIZATION is INDEXED.

In a COBOL SELECT statement for a KSDS can you tell me what are the 3 possibilities for ACCESS?
Answer : The three possibilities for ACCESS can be RANDOM, SEQUENTIAL or DYNAMIC.

What will happen if there is no secondary allocation made for Datasets?
Answer : VSAM will inform COBOL program of the problem and terminate the processing of the program.

What do you mean by IDCAMS? Explain its purpose?
Answer : IDCAMS, also known as Access Method Services, is used to perform the following tasks cited below.
  • Createing a VSAM data set, VSAM alternate index, or catalog.
  • Conversion of non-VSAM to VSAM data set.
  • Listing a catalog entry for a data set, Dataset/catalog contents.
  • Copy a Dataset or catalog.
  • Loading of a VSAM Dataset from VSAM records
  • Renaming of VSAM data sets.
Why CI and CA splits are not possible in ESDS and RRDS?
Answer : In ESDS the new record is added at the end of last record. And no embedded free space is allocated at the time of Dataset definition. In the case of RRDS the slots for the records are pre-allocated and so the CI and CA split is not possible.

Is it required that primary Key values have to be unique? Do alternate Key values have to be Unique?
Answer : Primary Key values must always be unique however alternate Key values need not be unique all the time.

What do you mean by the COBOL RECORD KEY clause in VSAM?
Answer : The RECORD KEY in the SELECT clause identifies the files Primary Key as it will be made available to the program.

What is the use of the FILE STATUS clause in the SELECT statement in VSAM?
Answer : The FILE STATUS field is used to identify the field that VSAM uses to provide information about each I/O Operation for the file.

To use the REWRITE command, how should the VSAM file be opened?
Answer : It should be opened Input/Output mode.

What do you mean by a VSAM split?
Answer : If there is a memory crunch and there is not enough space in the Control Interval, VSAM performs a Control Interval split by moving some records to the free Control Intervals. If there isn't a free Control Interval,then VSAM performs a control area split by allocating a new control area and moving half of the Control Intervals to it.

Explain the meaning and syntax for the START command?

Answer : In VSAM, the START command is used to read other than the next VSAM record. For this, A value must be moved into the RECORD KEY. However, the KEY clause is optional, but it can be used to specify a relational operator.

Explain what is the meaning of dynamic processing in VSAM?

Answer : Dynamic processing means one program uses both sequential and random processing for a VSAM KSDS file. It is however rarely used in VSAM.

Can you name some common VSAM error conditions and codes?

Answer : They are end of file (10), duplicate Key (22), record not found (23), Out of space condition is raised (28) ,VSAM logic error (90), open problem (92) and space problem (93).

bIt is a COBOL II enhancement to VSAM batch processing expanding the FILE STATUS field. It is defined in WORKING - STORAGE as a six byte group item with three two byte elements, the normal return code, the function code and the feedback code.

What do you mean by a VSAM slot?

Answer : VSAM slot is a relative record Dataset (RRDS) consists of a specified number of areas called slots. Each slot is identified by a relative record number (RRN) which indicates its relative position in the file.

Name the utility program closely associated with VSAM?

IDCAMS is the utility, the access method services utility.

There are seven IDCAMS commands in VSAM. Can you name and explain each of them?

  • ALTER is used for modification of information for a catalog, alternate index, cluster or path.
  • BLDINDEX is used to build the alternate index.
  • DEFINE is used for ALTERNATEINDEX, CLUSTER or PATH.
  • DELETE is used to remove the catalog entry for a catalog, cluster, alternate index or path.
  • LISTCAT  is for listing Information about the Dataset.
  • PRINT is used to print the Dataset contents.
  • REPRO is used to copy records from one file to another.
Can you tell me what are the three levels of definition for the VSAM DEFINE?
Answer : They are INDEX, DEFINE CLUSTER and DATA.

Explain what is the significance of the SHAREOPTIONS parameter?

Answer : SHAREOPTIONS parameter specifies how the file may be shared between jobs and between batch and CICS Environments.

What do you mean by DEFINE MODEL parameter? 

Answer : DEFINE MODEL parameter specifies whether the MODEL parameter allows you to model your cluster by modelling it after an existing cluster.

Can you tell me how do you fix the problem associated with VSAM out of space condition?

Answer : We can fix it by the following.
  • By defining new VSAM Dataset allocated with more space.
  • By using IDCAMS to REPRO the old VSAM file to new VSAM Dataset.
  • By using IDCAMS to ALTER / rename the old VSAM Dataset or set IDCAMS to DELETE the old VSAM Dataset.
  • By using IDCAMS to ALTER / rename the new VSAM Dataset to the name of the original VSAM Dataset.
Explain how many ways you can load data in a VSAM cluster?
Answer : There are two ways to achieve that.
Firstly by using the REPRO command and secondly by using COBOL program.

VSAM Realtime Interview Questions and Answers

9/27/2009 No Comment

IBM VSAM Realtime Interview Questions and Answers.

What  will happen when you try to open an empty VSAM file in a COBOL program for input?
Answer : 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.

Explain how can you initialize a VSAM file before any operation?
Answer : You can write a dummy program that will just open the file for output and thereafter closes it.

Can you tell me what does a file status of 02 on a VSAM signifies?
Answer : It indicates duplicate alternate key. It happens on both input and output operation.

How can you load a VSAM data set with records ?
Answer : For loading we can use the REPRO command.

Differentiate between Sequential files and ESDS files in VSAM?

Answer : In VSAM, Sequential(QSAM) files can be created on tape while ESDS files cannot be created. Again, you can have ALTINDEX for an ESDS while no such facility that exists for QSAM files.

Explain how do you define a GDG in VSAM?

Answer : We can 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)

Is it necessary that all versions of the GDG have to be of the same record length ?

Answer : It is not required, the DCB of the model dataset can be overridden when you allocate new versions.

Explain in brief how are different versions of GDG named ?

Answer : base-file-name.GnnnnnV00 where nnnn= generation number (upto 255).
nnnn will be 0000 for the 1st generation.


What are the additional information you should give in the DD statement while defining the next generation of a GDG?

Answer : Give (+1) as the generation number, give (new,catlg) for disp, give space parameter, can give the dcb parameter if you want to override the dcb of the model dataset.

When the DEFINE JCL is not available, how can you get information about a VSAM file’s organisation ?

Answer : You can use the LISTCAT command.

What are the different types of VSAM Datasets?

Answer : 
  • Entry sequenced Datasets (ESDS), 
  • Key sequenced Datasets (KSDS) and relative record
  • Dataset (RRDS), LDS (linear Data Set).
Can you tell me how are records stored in an ESDS, entry sequenced Dataset?
Answer : They are stored without respect to the contents of the records and in the order in which they are included in the file.

Explain in brief why do VSAM take more disk space than other utilities?

Answer : VSAM increases the disk space requirements of systems. This is because VSAM offers certain capabilities like partial self-reorganization to make things more efficient in data sets that can be modified.

Can you specify some the distinctive features of a KSDS, Key Sequenced Dataset?

The index and the distributed free space. CI and CA splits upon updates. Record length may be changed during the time of update. The records are accessed by a particular Key in KSDS.

VSAM Interview Questions asked in MNCs

9/17/2009 No Comment

IBM VSAM Interview Questions and Answers.

Name the different types of VSAM files available?
Answer : The different types of VSAM files available.
ESDS: Entry Sequence Data Set
RRDS: Relative Data Set
KSDS: Key Sequence Data Set

What do you mean by IDCAMS ?
Answer : IDCAMS is nothing but the Access Method Services program. You can run the IDCAMS program and supply AMS commands thru SYSIN. Some examples of AMS commands are DELETE, REPRO, DEFINE etc.

Can you run AMS commands from the TSO prompt ?

Answer : Yes, you can run AMS commands from TSO prompt.

Under IDCAMS , there are multiple functions that can be executed, each of which returns a condition code. What will be the condition code returned to the operating system ? 
Answer : The maximum condition code generated is returned as the condition code of the IDCAMS step.

Explain in detail what is Control Interval and Control Area in VSAM?
Answer : Control Interval is analogous to a physical block for QSAM files. It is the unit of input/output. It should be between 512 bytes to 32 K. A larger control interval increases performance for sequential processing while the reverse is true when you use it for random access. 
Under CICS, when a record is locked, the entire Control Interval gets locked.

Whereas 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.

Explain how do you decide on optimum values for Control Interval, FREESPACE in VSAM?

Answer : Control Interval size should be based on record length, type of processing. Usually CI is 4K. If record length is larger(>1K), chose 6K or 8K.

FREESPACE 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.


Can you explain the meaning of each of the values in SHAREOPTS(2 3)?
Answer : 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).

Is there a need to specify FREESPACE for an ESDS?

Answer : No, there is no need to specify FREESPACE. As, you cannot insert records in an ESDS, also when you rewrite a record, it must be of the same length thereby putting any value for free space does not make any sense.

What do you mean by SHAREOPTS in VSAM?

Answer : SHAREOPTS is just a parameter in the DEFINE which specifies how an object can be shared among users. It is coded as SHAREOPTS(a b), where a is the cross region share option i.e how two or more jobs on a single system can share the file, while b is the cross system share option i.e how two or more jobs on different MVSes can share the file. Usual value for SHAREOPTS is (2 3).

IBM VSAM Frequently Asked Interview Questions and Answers

8/16/2009 No Comment

VSAM Frequently Asked Interview Questions and Answers.

Explain what is is an alternate index in VSAM?
Answer : An alternate index in VSAM is another file related to the cluster, but sorted using an alternate key that can have duplicates.

Explain the process of creating an alternate index?
Answer : 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.

Can you tell me what is the parameter in the DEFINE AIX option that is used to determine the maximum number of duplicate keys allowable?

Answer : We can use the RECORDSIZE parameter to determine it. 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.

Can you name a few common VSAM status codes.

  • 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
Explain what do you meany by buffering and how does it apply to VSAM files.
Answer : When  there are large blocks of data that are to be used, more main storage is required than when smaller blocks are used, but one advantage of large blocks is that it save CPU time and disk space. Morever, 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 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.
 

Aired | The content is copyrighted and may not be reproduced on other websites. | Copyright © 2009-2016 | All Rights Reserved 2016

Contact Us | About Us | Privacy Policy and Disclaimer