Mainframe DB2 Interview Questions & Answers

  1. Question 1. How Do You Select A Row Using Indexes In Db2?

    Answer :

    Specify the indexed columns in the WHERE clause of db2 query.

  2. Question 2. How Do You Find The Maximum Value In A Column In Db2?

    Answer :

    Use SELECT MAX(…) .. in db2 query

  3. IBM-REXX Interview Questions

  4. Question 3. How Do You Retrieve The First 5 Characters Of Firstname Column Of Db2 Table Emp ?

    Answer :

    SQL Query : SELECT SUBSTR(FIRSTNAME,1,5) FROM EMP;

  5. Question 4. What Are Aggregate Functions?

    Answer :

    Bulit-in mathematical functions for use in SELECT clause.

  6. IBM-REXX Tutorial

  7. Question 5. Can You Use Max On A Char Column?

    Answer :

    YES.

  8. IBM-CICS Interview Questions

  9. Question 6. My Sql Statement Select Avg(salary) From Emp Yields Inaccurate Results. Why?

    Answer :

    Because SALARY is not declared to have NULLs and the employees for whom the salary is not known are also counted.

  10. Question 7. What Is The Use Of Value Function?

    Answer :

    1. Avoid -ve SQLCODEs by handling nulls and zeroes in computations
    2. Substitute a numeric value for any nulls used in computation
  11. IBM-CICS Tutorial
    JCL Interview Questions

  12. Question 8. Explain The Function Of Data Manager ?

    Answer :

    The physical database is managed by the DB2 component called Data manager. It invokes other system components to perform logging, locking etc.

  13. Question 9. What Is A Storage Group (stogroup)?

    Answer :

    STOGROUP is a named collection of DASD volumes, which is to be used by index spaces and table spaces of the database.

  14. IBM DB2 Interview Questions

  15. Question 10. Define Predicate?

    Answer :

    Predicate is an element of a search condition. It expresses or implies a search condition.

  16. IBM DB2 Tutorial

  17. Question 11. Define Declaration Generator (dclgen) ?

    Answer :

    Declaration Generator is a facility that is used to form SQL statements that describes a table or view. At pre-compile time, the table or view descriptions are then used to check the validity of SQL statements.

  18. COBOL Interview Questions

  19. Question 12. List Out The Buffer Pools In Db2 ?

    Answer :

    There are four buffer pools in DB2 and they are

    1.          BP0
    2.         BP1
    3.         BP2
    4.         BP32
  20. IBM-REXX Interview Questions

  21. Question 13. Define Clustering Index ?

    Answer :

    Clustering index is a type of index, which locates the table rows and determines how to group the rows together in the tablespace.

  22. COBOL Tutorial

  23. Question 14. What Is Concurrency?

    Answer :

    More than one DB2 application process can access the same data at the same time, is known as concurrency. However, problems can happen such as, lost updates access to unrepeatable reads and uncommitted data.

  24. Question 15. Explain The Function Done By Data Manager?

    Answer :

    Data manager can be considered as a component that is capable of managing the databases that are physically present and is capable of invoking other components associated with the system for performing functionalities like logging, locking and in performing other I/O operations.

  25. MySQL Interview Questions

  26. Question 16. Explain About Dbrm ?

    Answer :

    DBRM stands for Database Request Module and is a component inside DB2, which is created by the pre compiler of DB2. This is a module that consists of SQL source statements that get extracted out of the application program. DBRMs form inputs that are helpful in the binding process.

  27. MySQL Tutorial

  28. Question 17. Define Data Page?

    Answer :

    Data page can be considered as a unit that is capable of retrieving data from the database. The database from which the data can be retrieved is in the form of 4 kilobytes or 32 kilobytes. The form in which data is retrieved depends on the way the table is defined inside the database. Data page also contains information regarding the catalog or user that are part of the database.

  29. IBM-JCL Interview Questions

  30. Question 18. Explain About Rct?

    Answer :

    RCT is expanded as Resource – Control Table and is defined in the DB2/CICS region. This is the component that comprises of features that are gathered through macros of DSNCRCT. RCT matches with the transaction ID that of CICS, with the authorization ID that of DB2. This should also be matched with plan ID.

  31. IBM-CICS Interview Questions

  32. Question 19. How Can Tablespace Be Moved To Another Dasd Volume That Is Allocated For That Tablespace?

    Answer :

    Tablespace that you are using is allocated only to STOGROUP, then you can enter the command ALTER STOGROUP for adding as well as deleting volume. REORG TABLESPACE and RECOVER TABLESPACE are statements that are helpful in creating new STOGROUP that can point towards the new volume. ALTER tablespace and REORG and RECOVER are statements used for altering and recovering the tablespace allocated in the memory.

  33. IBM-JCL Tutorial

  34. Question 20. What Is The Information Associated With Sysibm.syslinks Table?

    Answer :

    This is the table that contains information on the links that exists between the tables created through referential constraints.

  35. Oracle 11g Interview Questions

  36. Question 21. Explain In Detail About Buffer Manager And Its Functionalities?

    Answer :

    Buffer manager can be considered as the component inside DB2 that helps in transferring data between virtual as well as external medium. The buffer manager reduces the quantity of physical input as well as output operations that are actually performed by making use of buffering techniques that are highly sophisticated.

  37. Question 22. Explain About Cursor Stability?

    Answer :

    Cursor stability is the property that tells the DB2 that the values of database that are read by making use of this application gets protected while the data is used.

  38. Oracle 11g Tutorial

  39. Question 23. How Do You Specify And Use A Cursor In A Cobol Program?

    Answer :

    Use DECLARE CURSOR statement either in working storage or in procedure division(before open cursor), to specify the SELECT statement. Then use OPEN, FETCH rows in a loop and finally CLOSE.

  40. System Administration Interview Questions

  41. Question 24. What Happens When You Say Open Cursor?

    Answer :

    If there is an ORDER BY clause, rows are fetched, sorted and made available for the FETCH statement. Other wise simply the cursor is placed on the first row.

  42. JCL Interview Questions

  43. Question 25. Is Declare Cursor Executable?

    Answer :

    No.

  44. IBM Mainframe Tutorial

  45. Question 26. Can You Have More Than One Cursor Open At Any One Time In A Program ?

    Answer :

    Yes.

  46. IBM-JCL&VSAM Interview Questions

  47. Question 27. How Do You Leave The Cursor Open After Issuing A Commit?

    Answer :

    Use WITH HOLD option in DECLARE CURSOR statement. But, it has not effect in psuedo-conversational CICS programs.

  48. IBM DB2 Interview Questions

  49. Question 28. Give The Cobol Definition Of A Varchar Field.

    Answer :

    A VARCHAR column REMARKS would be defined as follows:

    10 REMARKS.

    49 REMARKS-LEN PIC S9(4) USAGE COMP.

    49 REMARKS-TEXT PIC X(1920).

  50. Question 29. What Is The Physical Storage Length Of Each Of The Following Db2 Data Types:date, Time, Timestamp?

    Answer :

    DATE: 4bytes

    TIME: 3bytes

    TIMESTAMP: 10bytes

  51. IBM Mainframe Interview Questions