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 |
how we can reverse the string in the cobol for example satheesh can be reveresed as hseehtas
88 class is used for
What are the pertinent COBOL
i have n records in one file and in this file there is some fields and i want to count that how many sharma in my file so plz give the coding that how we read sharma ?
1)what is the maximum limit for occurs? Eg: 01 A PIC X(10) OCCURS N TIME. What is the max value for N?
COBOL program to read the string ' BOMBAY' in reverse order as 'YABMOB'
What is the mode in which you will OPEN a file for writing?
How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning.
What are all the divisions of a COBOL program?
What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?
01rec1. 05 a pic 999v99 value 123.12 05 b pic 99v9 value 45.9 02 rec2. 05 x pic 999v99 05 y pic 99v99 05 z pic x(3) value 'abc' if rec1 is moved to rec2 then what is the value of rec2?
Read filea And file b write the same records in both files? Records in a but not in b record in b but not in a