DB2 - 4 Flashcards
You can use cursors to fetch, update, or delete a row of a table.
True or False?
True
False
True
Each cursor requires its own:
DECLARE CURSOR statement to define the cursor
OPEN and CLOSE statements to open and close the cursor
FETCH statement to retrieve rows from the cursor’s result table.
All the above
All the above
The DB2 declarations generator, DCLGEN, produces DECLARE statements for C, COBOL, and PL/I programs.
True or False?
True
False
True
SQL statements must be coded in Area Z.
True or False?
True
False
False
There are a few DDNAMES required for DB2 programs to run.
True or False?
True
False
True
There are no manuals to research DB2 errors codes.
True or False?
True
False
False
Once retrieving records from the table has been completed, we need to close the cursor using the following command:
MOVE ACCT-NO TO ACCT-NO-O.
EXEC SQL CLOSE CUR1 END-EXEC.
WRITE REPREC AFTER ADVANCING 2 LINES.
PUBLIC VOID OPEN (FILE FILE) THROWS IOEXCEPTION.
EXEC SQL CLOSE CUR1 END-EXEC.
Which section would you DECLARE a cursor?
DECLARE cursor in the Java Virtual Machine
DECLARE cursor in the WORKING-STORAGE SECTION
DECLARE cursor in the Heap
DECLARE cursor in the B-tree
DECLARE cursor in the WORKING-STORAGE SECTION
What is SQLCA ?
SQLCA is part of the JVM
SQL communication area
SQLCA is a specification for JavaScript Object Notation
SQLCA is SQL in California
SQL communication area