what happens if we dont close cursor in db2-cobol pgm?
Answers were Sorted based on User's Feedback
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 |
Answer / manju
When the COMMIT stmt is issued, the cursor is atomatically
closed.
| Is This Answer Correct ? | 11 Yes | 2 No |
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 |
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 |
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 |
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 |
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
Discuss about changing dataset name in proc.
how do you move only numeric data from A to B 01 A pic x(10) value 'a1b2c34d5e'. 01 B pic x(5).
88 class is used for
i want to store 20 digits . h will u do it in cobol ?
I have a field with data type X(10). I want to perform arithmetic operation on this field? I tried doing it by moving the value into a numeric field. but it didn't work out. I am getting a S0C7 abend. Pls let me know if there is any way of getting this done?
We are using the searching a table which is indexed, once the key is found, how can we get the occurance at which the key was found.
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
What is different between variable length and fixed length?
. How do we cast a variable in COBOL
where do we use dyanamic call ? and where do we use static call pls give any example pls ?
How do you reference the fixed block file formats from cobol programs