What is the significance of the CURSOR WITH HOLD clause in
a cursor declaration?
Answers were Sorted based on User's Feedback
Answer / abhisek
As soon as the COMMIT statement is executed in a
program,the cursor gets automatically closed,So we need to
give CURSOR WITH HOLD clause,in order to keep it open after
execution of the COMMIT statement.
| Is This Answer Correct ? | 43 Yes | 2 No |
Answer / ss
To remain cursor open after commit statement execution
| Is This Answer Correct ? | 33 Yes | 0 No |
Answer / yogendra shinde
Hi,
CURSOR with WITHOLD is very useful where we need to use
more than 1 database simultaneously.
Suppose you are reading or fetching a value from local
database and updating those retrieved values in a remote
DB. In such case when you connect to remote DB, you need to
use WITHOLD for local db. So that you don't loose the
cursor position for local db.
For further ref. do read more about CONNECT.
| Is This Answer Correct ? | 10 Yes | 2 No |
Answer / mainframe virumbi
The answers given above is correct only. Adding those, we
cant execute sql statements other than select, after commit
is encountered.
| Is This Answer Correct ? | 8 Yes | 1 No |
What do you mean by NOT NULL? When will you use it?
Comment whether dclgen is mandatorily used. If not, then what is the point of using it?
Can we declare DB2 HOST variable in COBOL COPY book?
What is a PLAN table? How will you use it? Give the various fields of PLAN table?
How will you delete duplicate records from a table?
What are packages in db2?
What is bind plan?
How do you declare a host variable (in COBOL) for an attribute named emp-name of type VARCHAR(25) ?
What are the levels of isolation available with DB2V4
What is a view? Why use it?
In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?
could you give me an example how, where i code CHECKPOINT and restart...I need and example....thanks..