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 |
In a program, variables are used but no DB2 involved in it. Can you call it as host variables??
is it possible to declare index in cobol program? if it is not why its tell me pls
what is the minimum number of lines a Cobol program should have to successfully compile and run
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
How to replace the GOTO statement in COBOL without changing the structure of program. e.g. consider following code... I.D. E.D. D.D. P.D. compute C = A + B. GOTO para 100-display. compute D = C - D. GOTO 200-display. some other logic...... ........ GOTO 300-para. ...... ...... GOTO 400-para. Now I want to replacce all GOTO statements without changing the structure and otput of program.
How do you define a variable of comp-1 and comp-2?
Hi All, Can anyone tell me how we can MOVE value of a X(19) variable to a S9(17) COMP-3 variable? Answer with an Example will be of great help.
01 a pic s9(5) occupies how many bytes ?
WHY LRECL NEEDS TO BE 4 EXTRA THEN THE COBOL FILE LENGTH & WHAT IT CONTAIN IN THAT LENGTH
Why occurs cannot be used in 01 level in COBOL?
what is sysncpoint?
SIGN TRAILING SEPARATE field occupy ?