what happens if we dont close cursor in db2-cobol pgm?

Answers were Sorted based on User's Feedback



what happens if we dont close cursor in db2-cobol pgm?..

Answer / vaid

i think, if we dont close a cursor there will be no problem.

since once the program ends all the database
transaciton/connections are terminated and also commit is
implicitly executed.. so the cursors will be closed.

and all resources held by program will be released.

Is This Answer Correct ?    12 Yes 1 No

what happens if we dont close cursor in db2-cobol pgm?..

Answer / manju

When the COMMIT stmt is issued, the cursor is atomatically
closed.

Is This Answer Correct ?    11 Yes 2 No

what happens if we dont close cursor in db2-cobol pgm?..

Answer / i go crazy

If the cursor is declared WITH HOLD option, then after committing cursor will not close. Otherwise cursor will close automatically after committing or after the end of the program.

Is This Answer Correct ?    8 Yes 0 No

what happens if we dont close cursor in db2-cobol pgm?..

Answer / swamy

If you dont close cursor in your db2-cobol program, the
program will effectively have a hold on the tablebase and will
prevent other users from acessing it or updating it. Correct
me if i am wrong

Is This Answer Correct ?    6 Yes 5 No

what happens if we dont close cursor in db2-cobol pgm?..

Answer / karthic

If the cursor has not been closed, the cursor will occupy
the whole private SQL work area. The next query performance
will be affected.

Is This Answer Correct ?    3 Yes 2 No

what happens if we dont close cursor in db2-cobol pgm?..

Answer / vinodquestion

I am not confident about this answer::

I think no problem when u not close cursor. But problem occurs when you again OPEN CURSOR.

When this happen some cursor related errors occurs. I think 502 will show. I Dont know exactly.

Please Correct My answer if it is wrong.

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More COBOL Interview Questions

What kind of error is trapped by on size error option?

0 Answers  


What is perform what is varying?

0 Answers  


What is the meaning of 'TALLING' verb in cobol?

5 Answers  


in cobol main pgm is calling sub pgm but sub pgm does not exists , what abend i get if submit the job?

2 Answers   HSBC,


what are the working storage fields in BMS macro?

2 Answers   IBM,






I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

0 Answers  


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

0 Answers  


How many times the loop runs here 01 a pic 9(2) value 1. perform para1 until a=10 move 1 to a. stop run. para1: move 10 to a.

5 Answers  


How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?

0 Answers  


what is SYNCHRONIZATION?

3 Answers   Syntel,


u have passed sme charecters thru parm parameter in jcl. how do u code in cobol to recieve the values u gave in parm ?

2 Answers   IBM,


What is inspect in cobol ?

0 Answers   Infosys,


Categories