DB2 - 4 Flashcards

1
Q

You can use cursors to fetch, update, or delete a row of a table.

True or False?

True
False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

All the above

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The DB2 declarations generator, DCLGEN, produces DECLARE statements for C, COBOL, and PL/I programs.

True or False?

True
False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

SQL statements must be coded in Area Z.

True or False?

True
False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

There are a few DDNAMES required for DB2 programs to run.

True or False?

True
False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

There are no manuals to research DB2 errors codes.

True or False?

True
False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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.

A

EXEC SQL CLOSE CUR1 END-EXEC.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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

A

DECLARE cursor in the WORKING-STORAGE SECTION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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

A

SQL communication area

How well did you know this?
1
Not at all
2
3
4
5
Perfectly