Accenture Db2 Placement Papers - Accenture Db2 Interview Questions and Answers updated on 06.Dec.2023

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

  1.  Use SPUFI or MF to EXPLAIN the dynamic SQL statement
  2.  Include EXPLAIN command in the embedded dynamic SQL statements

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

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.

CS: Releases the lock on a page after use

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

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)

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

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.

A non matching index scan if ACCESSTYPE = I 

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

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

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

No, DECLARE CURSOR is not executable.

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.


  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

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.

During the BIND process ISOLATION ( CS/RR )

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.

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)