what happend with out using Commit,when closing cursor and
program?
Answers were Sorted based on User's Feedback
Answer / harish
yes, commit-it will save the changes that we done to db2
table
when operation is performed successfully table will be auto
committed its default,suppose if any abends occur all
changes will be rolled back , table will come to original
status
since while updating millions of records somewhere some
abend occurs that time its better to have commit ,so till
upto abend whatever changes occured in table will be
saved.....
pls let me know if u have any queries
HARISH POOMGAME SHIVAPPA
NIIT TECHNOLOGY
KOLKATA
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / praveen
If the program ran successfully, then it will commit.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / guna
If there is no commit while closing cursor or a program,
processed records are lost when an abnormal end occurs.
Say, if due to the execution of the program some rows are
inserted/deleted/updated in a table, those changes will be
lost.
It is a better practice to give commit after every
insertion/updation queries and before terminating a
program.
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / vish
True that we should Explicitly COMMIT the data instead of
depending on auto comit. But COMMITing after every
insert/update of data is not a very good option. Explicit
COMMIT incurs an overhead and makes the processing slow. So
if we are inserting/updating a large number of data into
table, COMMIT after every such update will make the Job
very slow, which in most of the cases, is not preferrable
for production Jobs. In fact, the COMMIT frequency should
be chosen very carefully for every program (please note we
should not have a common COMMIT frequncy for all the
programs as the data being proceesed by different programs
will be different and hence their importance & time to re-
process them also differs) keeping in mind that neither the
performance should be degraded nor the data should be lost.
Suggesstions are Welcome!!
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / mani
The answer to the question is pretty simple and straight.
Auto commit happens when the cursor is closed.
If at all there is any abend then the changes made will be lost.
| Is This Answer Correct ? | 4 Yes | 3 No |
Explain db2.
What is DCLGEN?
What parameters are used to control the free space in DB2?
When you are working with the project after coding what will u do? Like what type of documents u will prepare? How will u do testing?
what is the syntax for FOR UPDATE CLAUSE in cursor declaration and how can u update using cursor? is it possible to update multiple rows at a time.
I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LOCATION AND DEPT_TABLE CONTAINS DEPTNO,DOJ(DATE OF JOINING).I WANT TO DISPLAY NAME,DEPTNAME,DOJ AND WHO ARE JOINED BETWEN 01- JAN-2007 TO 01-JAN-2008?
Generally if I want to select the names starting with c I need to use c% But how could I code to select the data which contains % as a part of data.
Explain various types of locks in db2?
What is reorg?
What information is used as input to the bind process?
Which are the db2 tools to protect integrity of the database?
A Table feild is declared as Decimal(7,2). I want to insert the decimal in to this column thru cobol-db2 program. How should I declare my local input file variable or any suggestion?