26) How do you specify and use a cursor in a COBOL program? –
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.
27) What happens when you say OPEN CURSOR?
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.
28) Is DECLARE CURSOR executable?
No.
29) Can you have more than one cursor open at any one time in a program ? –
Yes.
30) When you COMMIT, is the cursor closed? - drona questions
Yes.
|