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 |
TO abend the data sholud open in which mode? 1.new 2.old 3.mod 4.shr
Why did you choose to work with ibm mainframe cobol programming?
What is the compute verb? How is it used?
What compiler option would you use for dynamic linking?
What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I am going to Display the WS-VARX and WS- VARN?
Can we use redefine clause in occurs clause?
How can we find out wether to declare the data items like Integer, Char,Comp? If comp types how can we decide wether it is Comp and Comp3.How it is? Please Explain... Cheers.
Identify the invalid dataname from the following: (A) savings-account (B) annual-allocation-for-overhead (C) samount250 (D) 12demand
What is the LINKAGE SECTION used in COBOL?
If I want to increase the Limit in GDG. What should I do?
How to print 10 to 1 if the input have only 10 digit number?
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.