I have a subprogram B calling from mainprogram A.I have
opened a cursor in A ,Can i fetch the same cursor in
subprogram B , If yes , Please explain the reason?



I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same..

Answer / harsha

I feel yes, we can fetch the same cursor in the same
program.
Cursor can be closed in three ways.
1 When you explicitely close trhe cursor.
2 Issuing commit systement.
3 After execution of an application program.

In our situation, none of the above mentioned case is
getting true.

Is This Answer Correct ?    11 Yes 2 No

Post New Answer

More DB2 Interview Questions

What is the role of the data page in the db2 database?

0 Answers  


I have 3 cursors declared. Cursor1 retieves some data. Based on this curso2 will also fetches some data. In cursor3 (using for some updation) I'm using the data retrieved by the above 2 cursor. My question is, while working with cursor3, periodically if I give commit, will all the three crsors will be closed or only cursor3 will be closed?

4 Answers  


What is a synonym ?

2 Answers  


What are host variables in db2?

0 Answers  


If we have 100 records in the PF, we deleted all the records then what is the Size of the PF?

2 Answers  






what is a plan and how do you refer the plan in the program?

2 Answers   Xansa,


What is image copy?

1 Answers   Virtusa,


What is the result of open cursor statement?

0 Answers  


How to retrieve rows from a db2 table in embedded sql?

0 Answers  


What is copy pending status in db2?

0 Answers  


How to resolve -805 error in DB2?

1 Answers   Cap Gemini,


Before you give the explain statement, what are the prerogatives?

0 Answers  


Categories