View previous topic :: View next topic |
Author |
Message |
Ranjish Beginner
![](images/avatars/gallery/misc/Dis115.gif)
Joined: 22 Dec 2002 Posts: 64 Topics: 28 Location: Chennai
|
Posted: Fri Jan 24, 2003 9:42 am Post subject: Commit In Cobol |
|
|
Hi,
When will the COMMIT happen in a Cobol program if there are no explicit COMMIT statements are there in the program ?
Is it that when the program completes, the Commit is happening?
regards
Ranjish |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Fri Jan 24, 2003 10:32 am Post subject: |
|
|
At the end of Job. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Ranjish Beginner
![](images/avatars/gallery/misc/Dis115.gif)
Joined: 22 Dec 2002 Posts: 64 Topics: 28 Location: Chennai
|
Posted: Sat Jan 25, 2003 2:19 am Post subject: |
|
|
Thanks Suresh for the immediate response.
I have one more question. When we did a testing of a Cobol-DB2 program which is not having COMMIT with xpediter, the data base updations did not happen. Is there any way of solving this other than coding explicit COMMIT in the program?
regards
Ranjish |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
CaptBill Beginner
Joined: 02 Dec 2002 Posts: 100 Topics: 2 Location: Pasadena, California, USA
|
Posted: Mon Jan 27, 2003 2:36 pm Post subject: |
|
|
I suspect this may be caused by the fact that you are really running XPEDITER as the monitor, not the application program you are testing. So while you see the GOBACK or STOP RUN statement executed, XPEDITER is still in control. You may in fact really never end properly and so a roll back might be done.
I looked at my XPEDITER manuals for Release 6.6 and found on page 5-46 a topic "Using XPEDITERfor DB2 Extension". There is a subtopic, Inserting Program SQL Statements. You might want to add a COMMIT just before the program termination to force it. The COMMIT you add in XPEDITER is not added to the SOURCE you compile so it will not effect the source that way.
But wouldn't good programming practice require a COMMIT to be in the original source program to begin with? That way there would be no doubt as to what happened and it certainly does not hurt anything. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|