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 |
which certifications r 4 cobol,jcl,db2,cics what is format of xam n what is importance of these certifications... plz post answer only if u r sure... thanks
What is a subscript ?
how many divisions are there in cobol
What is the mode in which you will OPEN a file for writing?
How many maximum number of procedures can we write in one COBOL program?
What is the use of LINKAGE SECTION?
Write a program to explain size error.
In file1 have 80 records are like d1,d2,d3......D80. File2 have 1000records are like a1d1,a1d2,a3d3.....Etc. I want matching records in file3 ? Plse tell me the matching logic???I want answer only in cobol ?Not using any tool or jcl?
what are difference organizations in cobol and access mode in cobol? can you expalin what organization means while declaring for ksds,esds,rrds?
why we are using picture clause in the cobol programs?
Q:what is the difference between the variable length and fixed lenght.how it varies in the cobol.
ID DIVISION. PROGRAM-ID. PLO. DATA DIVISION. WORKING-STORAGE SECTION. 01 VAR1 PIC 9(2). 01 VAR2 PIC X(2). PROCEDURE DIVISION. ACCEPT VAR2. MOVE VAR2 TO VAR1. STOP RUN. if i give 'PI' in var2 then what will b output of progr. any abend?????