-
What is the correct sequence of working with the cursors in a COBOL/DB2 program
1 Declare / fetch / open / close2 Open / Declare / fetch /close3 Declare / open / fetch /close4 None of the aboveDeclare / open / fetch /close
-
What is DCLGEN?
DCLGEN stands for declarations generator; it is a facility to generate DB2 sql data structures in COBOL or PL/I programs.
-
-
-
DB2 SQL Query
Table1 has the following data – Book Chapter ---------------------------- DB2 Retrieval DB2 Updates DB2 Locking COBOL File processing COBOL Working storage JCL Job statement CICS Maps What will be the result of the querySELECT BOOK FROM TABLE1 GROUP BY BOOK HAVING COUNT(*) > 1a.DB2, COBOL, JCL, CICSb.DB2, COBOLc.JCL, CICSd.DB2, CICSe.JCL, COBOLDB2, COBOL
-
What is a NULL value? What are the pros and cons of using NULLS?
A NULL value takes up one byte of storage and indicates that a value is not present as opposed to a space or zero value. It's the DB2 equivalent of TBD on an organizational chart and often correctly portrays a business situation. Unfortunately, it requires extra coding for an application program to handle this situation.
-
-
-
What is a lock?
A lock is the mechanism that controls access to data pages and tablespaces.
-
What is a synonym? How is it used?
A synonym is used to reference a table or view by another name. The other name can then be written in the application code pointing to test tables in the development stage and to production entities when the code is migrated. The synonym is linked to the AUTHID that created it.
-
-
-
What is a precompiler?
It is a DB2 facility for static SQL statements - it replaces these statements with calls to the DB2 language interface module.
-
-
What are foreign keys?
These are attributes of one table that have matching values in a primary key in another table, allowing for relationships between tables.
-
-
-
-
-
If the base table underlying a view is restructured, eg. attributes are added, does the application code accessing the view need to be redone?
No. The table and its view are created anew, but the programs accessing the view do not need to be changed if the view and attributes accessed remain the same.
DB2 Interview Questions
Ans