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

HOw can I get the negative sign while deduct high value from low value

0 Answers  


What was removed from COBOL in the COBOL II implementation?

0 Answers  


How can you declare the file ?

1 Answers   Wipro,


With in these three which one is the default one Call Reference, Call By Value, Call By Content.-Which one is default?

4 Answers   IBM,


In my table having 3000 Records. How can I delete the 500th row? (we don't know what is data inside the table)

3 Answers   Keane India Ltd,






plz any one tell clearly the justify right clause?

1 Answers  


COMP field occupy ?

2 Answers  


consider the following PROCEDURE DIVISION entry OPEN EXTEND IN-FILE identify the correct statement a.organization of IN-FILE is sequential and records can be added in the beginning b.organization of IN-FILE is sequential and records can be added in the end c.organization of IN-FILE is indexed and records can be added in the beginning d.organization of IN-FILE is indexed and records can be added in the end

3 Answers   TCS,


for an INITIALIZE and what keyword allows for an override of the default.

2 Answers  


The following entries appear in the WORKING-STORAGE SECTION: 01 DATE-TODAY. 05 YY PIC XX VALUE "90". 05 MM PIC XX VALUE "12". 05 DD PIC XX VALUE :31". 01 DATE-EDIT PIC XX/XX/XX. MOVE DATE-TODAY TO DATE-EDIT. (a) 901231 (b) 90/12/31 (c) 31/12/90 (d) 311290

4 Answers   TCS,


What are the two search techniques ?

2 Answers   iGate,


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

0 Answers   IBM,


Categories