FAQs(91 to 105)

91) How do you specify and use a cursor in a COBOL program? 

A)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.

92) What happens when you say OPEN CURSOR?

A)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.

93) Is DECLARE CURSOR executable?


94) Can you have more than one cursor open at any one time in a program ? 


95) When you COMMIT, is the cursor closed?


96) What is DB2 (IBM Database 2)?

A) DB2 is a subsystem of the MVS operating system. It is a Database Management System (DBMS) for that operating system.

97) What is an access path?

A) The path that is used to get to data specified in SQL statements.

98) What is an alias?

A) It is an alternate name that can be used in SQL statements to refer to a table or view in the same or remote DB2 subsystem.

99) Explain what a plan is?

A) Plan is a DB2 object (produced during the bind process) that associates one or more database request modules with a plan name.

100) What is a DB2 bind?

A) Bind is a process that builds ?access paths? to DB2 tables. A bind uses the Database Request Modules(s) (DBRM(s)) from the DB2 pre-compile step as input and produces an application plan. It also checks the user?s authority and validates the SQL statements in the DBRM(s).

101) What information is used as input to the bind process?

A) The database request module produced during the pre-compile. The SYSIBM.SYSSTMT table of the DB2 catalog.

102) What is meant by the attachment facility?

A) The attachment facility is an interface between DB2 and TSO, IMS/VS, CICS, or batch address spaces. It allows application programs to access DB2.

103) What is meant by AUTO COMMIT?

A) AUTO COMMIT is a SPUFI option that commits the effects of SQL statements automatically if they are successfully executed.

104) What is a base table?

A) A base table is a real table - a table that physically exists in that there are physical stored records.

105) What is the function of buffer manager?

A) The buffer manager is the DB2 component responsible for physically transferring data between an external medium and (virtual) storage (performs the actual I/O operations). It minimizes the amount of physical I/O actually performed with sophisticated buffering techniques(i.e., read-ahead buffering and look-aside buffering).