MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Commit In Cobol

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Ranjish
Beginner


Joined: 22 Dec 2002
Posts: 64
Topics: 28
Location: Chennai

PostPosted: Fri Jan 24, 2003 9:42 am    Post subject: Commit In Cobol Reply with quote

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
View user's profile Send private message
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Fri Jan 24, 2003 10:32 am    Post subject: Reply with quote

At the end of Job.
Back to top
View user's profile Send private message
Ranjish
Beginner


Joined: 22 Dec 2002
Posts: 64
Topics: 28
Location: Chennai

PostPosted: Sat Jan 25, 2003 2:19 am    Post subject: Reply with quote

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
View user's profile Send private message
CaptBill
Beginner


Joined: 02 Dec 2002
Posts: 100
Topics: 2
Location: Pasadena, California, USA

PostPosted: Mon Jan 27, 2003 2:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group