Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Explain What Are The Disadvantages Of Page Level Lock In Db2?

Answer»

The main DISADVANTAGE is the high resource UTILIZATION if large UPDATES are to be done.

The main disadvantage is the high resource utilization if large updates are to be done.

2.

Explain In Brief How Does Db2 Determine What Lock-size To Use?

Answer»
  1. BASED on the lock-size given while CREATING the tablespace
  2. Programmer can direct the DB2 what lock-size to use
  3. If lock-size ANY is specified, DB2 USUALLY choses a lock-size of PAGE

3.

Name The Various Locking Levels Available?

Answer»

PAGE, TABLE, TABLESPACE

PAGE, TABLE, TABLESPACE

4.

When Do You Specify The Isolation Level?

Answer»

During the BIND PROCESS ISOLATION ( CS/RR )

During the BIND process ISOLATION ( CS/RR )

5.

Differentiate Between Cs And Rr Isolation Levels?where Do You Specify Them?

Answer»

CS: Releases the lock on a page after use

RR: Retains all locks ACQUIRED till END of transaction. ISOLATION LEVEL is a parameter for the bind process

CS: Releases the lock on a page after use

RR: Retains all locks acquired till end of transaction. ISOLATION LEVEL is a parameter for the bind process

6.

Explain What Are The Various Isolation Levels Possible ?

Answer»

The isolation LEVELS are CS: Cursor STABILITY RR: Repeatable READ

The isolation levels are CS: Cursor Stability RR: Repeatable Read

7.

Explain How Can You Do The Explain Of A Dynamic Sql Statement?

Answer»
  1.  Use SPUFI or MF to EXPLAIN the dynamic SQL statement
  2.  INCLUDE EXPLAIN COMMAND in the embedded dynamic SQL statements

8.

What Does It Mean - Explain Has Output With Matchcols = 0?

Answer»

A NON MATCHING INDEX SCAN if ACCESSTYPE = I 

A non matching index scan if ACCESSTYPE = I 

9.

Can You Tell Where Is The Output Of Explain Stored?

Answer»

In USER ID PLAN_TABLE

In user id PLAN_TABLE

10.

Can You Tell What Do You Need To Do Before You Do Explain?

Answer»

You have to ENSURE that the PLAN_TABLE is CREATED under the AUTHID

You have to ensure that the PLAN_TABLE is created under the AUTHID

11.

Can You Tell Me How Can You Find Out The # Of Rows Updated After An Update Statement?

Answer»

You NEED to CHECK the VALUE STORED in SQLERRD(3)

You need to check the value stored in SQLERRD(3)

12.

List Some Fields From Sqlca.?

Answer»

SQLCODE, SQLERRM, SQLERRD

SQLCODE, SQLERRM, SQLERRD

13.

Explain In Brief How Is A Typical Db2 Batch Program Gets Executed ?

Answer»

You should USE DSN UTILITY to run a DB2 BATCH PROGRAM from native TSO An example is SHOWN: DSN SYSTEM(DSP3) RUN PROGRAM(EDD470BD) PLAN(EDD470BD) LIB('ED01TOBJLOADLIB') END Use IKJEFT01 utility program to run the above DSN command in a JCL

You should Use DSN utility to run a DB2 batch program from native TSO An example is shown: DSN SYSTEM(DSP3) RUN PROGRAM(EDD470BD) PLAN(EDD470BD) LIB('ED01TOBJLOADLIB') END Use IKJEFT01 utility program to run the above DSN command in a JCL

14.

Is Is Always Mandatory To Use Declare Table In Dclgen ? Can You Tell Why It Used?

Answer»

It not mandatory to have DECLARE TABLE STATEMENT in DCLGEN This is USED by the pre-compiler to validate the table-NAME, view-name, column name etc, during pre-compile.

It not mandatory to have DECLARE TABLE statement in DCLGEN This is used by the pre-compiler to validate the table-name, view-name, column name etc, during pre-compile.

15.

In Db2, Is It Always Mandatory To Use Dclgen? If Not, Why Would You Use It At All?

Answer»

It is not always MANDATORY to use DCLGEN USING DCLGEN, helps detect wrongly spelt column names etc during the pre- compile stage itself ( because of the DECLARE TABLE ) DCLGEN being a tool, would GENERATE accurate host variable definitions for the table reducing CHANCES of error.

It is not always mandatory to use DCLGEN Using DCLGEN, helps detect wrongly spelt column names etc during the pre- compile stage itself ( because of the DECLARE TABLE ) DCLGEN being a tool, would generate accurate host variable definitions for the table reducing chances of error.

16.

Explain What Are The Contents Of A Dclgen In Db2?

Answer»

EXEC SQL DECLARE TABLE statement which GIVES the LAYOUT of the table/view in terms of DB2 datatypes. A host language copy BOOK that gives the host variable DEFINITIONS for the column Names.

EXEC SQL DECLARE TABLE statement which gives the layout of the table/view in terms of DB2 datatypes. A host language copy book that gives the host variable definitions for the column Names.

17.

Can You Tell Me What Is The Physical Storage Length Of Each Of The Following Db2 Data Types:

Answer»

DATE, TIME, TIMESTAMP and its PICTURE clause in COBOL. DATE: 4bytes DATE: PIC X(10) TIME: 3bytes TIME PIC X(08) TIMESTAMP: 10bytes TIMESTAMP: PIC X(26)

DATE, TIME, TIMESTAMP and its picture clause in COBOL. DATE: 4bytes DATE: PIC X(10) TIME: 3bytes TIME PIC X(08) TIMESTAMP: 10bytes TIMESTAMP: PIC X(26)

18.

Describe 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)

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)

19.

When You Do A Database Commit, Is The Cursor Closed In Db2?

Answer»

YES, the CURSOR will be CLOSED.

Yes, the cursor will be closed.

20.

Explain In Brief How Do You Leave The Cursor Open After Issuing A Commit?

Answer»

USE WITH HOLD option in DECLARE CURSOR statement, it has not EFFECT in psuedo-conversational CICS PROGRAMS.

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

21.

Can You Tell If Declare Cursor Is Executable?

Answer»

No, DECLARE CURSOR is not EXECUTABLE.

No, DECLARE CURSOR is not executable.

22.

Is It Possible More Than One Cursor Open At Any One Time In A Program?

Answer»

YES, we can OPEN more than ONE CURSOR at a TIME

Yes, we can open more than one cursor at a time

23.

Can You Tell Me What Will Happen 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.

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.

24.

Explain How Can You Specify And Use A Cursor In A Cobol Program?

Answer»

Try to USE DECLARE CURSOR statement EITHER in WORKING STORAGE or in procedure division, to specify the SELECT statement Then use OPEN, FETCH rows in a loop and FINALLY CLOSE.

Try to use DECLARE CURSOR statement either in working storage or in procedure division, to specify the SELECT statement Then use OPEN, FETCH rows in a loop and finally CLOSE.

25.

What Are The Alternate Ways Available To You To Retrieve A Row From A Table In Embedded Sql Apart From Cursor?

Answer»

By USING SINGLE ROW SELECT.

By using Single row SELECT.

26.

Explain How Would You Retrieve Rows From A Db2 Table In Embedded Sql?

Answer»

can ACHIEVE it by EITHER by USING the SINGLE row SELECT statements, or by using the CURSOR

can achieve it by either by using the single row SELECT statements, or by using the CURSOR