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

In COBOL programming, what is PERFORM? What is VARYING?

0 Answers   CDC,


Hi Devolopers.. i need ur help.. i have 3 years of exp in Manual testing and SQL, next month onwards i shifted in to MAINFRAME TESTING... i have ZERO Knowledge abt mainframes.... PLS SUGGEST ME WHAT I LEARN in AMEERPET? mainframe testing or mainframe total devolopment subject... AS a devoloper u know every thing tester what to do PLSSSSSSSSS help me ITS VERY URGENT...

1 Answers  


Which of the following files can be OPENed in all the 4 modes? The four modes are INPUT, I-O, OUTPUT and EXTEND. (a) INDEXED (b) RELATIVE (c) SEQUENTIAL (d) All of the above

7 Answers   TCS,


01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?

3 Answers   Mind Tree,


record length in spool?

2 Answers   Infosys,






how we separate the cobol cics statements from cobol&cics programming?

1 Answers   Valtech,


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

4 Answers   Accenture,


How does IDMS communicate with CICS?

1 Answers   Covansys, Satyam,


period is missing in the cobol program which error we getting

5 Answers   TCS, Tesco,


What are the different data types in cobol?

0 Answers  


What are decleratives in COBOL ?

1 Answers   Xansa,


when SE37 SB37 and sd37 occurs how to increase the volume , primary quantity and secondary quantity?

1 Answers   Hewitt,


Categories