Can we declare cursor in Procudere division or open the
cursor in the Working storage section.
Is there any particular rules in the usage of cursors lifecycle
Answer / omkar panda
yes we can declare cursor in procedure division but we cant
open the cursor in working-storage section as it is an
executabale statement.the lifecycle of cursor is as below
1>declare cursor
2>open cursor
3>fetch cursor
4>close cursor
| Is This Answer Correct ? | 20 Yes | 2 No |
Is it mandatory to use DCLGEN? If not, why would you use it at all?
Hi Team, Please tell me, If i don't declare the cursor in the program and i have given open and fetch and close, then what error will get.
What is load utility in db2?
What do you mean by cursor?
is it possible to get -811 error when you use cursors. why?
What is Skeleton cursor table (SKCT)?
B37 abend during spufi?
Explain in brief how does db2 determine what lock-size to use?
Q4. How will you get the count of record without using COUNT verb in query?
What type of database is db2?
In a Cobol-DB2 program, I am fetching rows from 4 tables using cursor and then based on the a field present in that table, It processes the information accordingly..for example stat-c is one digit field..if stat-c is 'D' then the a row is deleted from table and written those details in to a file. If the stat-c is 'U' then a row is updated (hardcoded what to update)in a table and written those details in to a file. If the stat-c is 'I' then a row is inserted in a table and written those details in to two files. The issue is i have to include the intermediate commits. When an abend occurs, due to commit statement db2 tables will be saved, But there will be lose of file contents. When we resubmitting the job associated with this program there will be insert ,update and delete anomolies to avoid that what measures could be taken?. The intermediate commit is nothing but issuing commit after massive inserts, updates and deletes(sum of 500actions)
What do you do to keep the cursor from closing after a commit?