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 

How to commit an unit of work in COBOL (Batch program)

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


Joined: 02 Dec 2002
Posts: 48
Topics: 9
Location: Columbus, GA

PostPosted: Fri Jan 31, 2003 5:35 pm    Post subject: How to commit an unit of work in COBOL (Batch program) Reply with quote

Hi all,

I have a Batch program which will read a record from the file and writes a message in Message Queue. Also it writes a new record in a VSAM file. I Just want to commit the unit of work once each message is written to the Message Queue. I know that we have MQCMIT to commit MQSeries operations.

Is there any COBOL command to commit all (MQSeries operations and VSAM files) or atleast VSAM files.

Please let me know, If you have any other solutions also.
_________________
Thanks,
Jeba
(Known is a drop Unknown is an ocean)
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Fri Jan 31, 2003 6:16 pm    Post subject: Reply with quote

Jeba,

You can issue a MVS Checkpoint for every unit of work.The catch here is you will need an assembler routine to issue the checkpoint.Check this link for

z/OS V1R3 DFSMSdfp Checkpoint/Restart


Coming to other solutions:

I would write all the vsam records to a flatfile and later on do a REPRO WITH REPLACE option to the VSAM file in question.By doing so , you will not have an exclusive lock on the vsam file while the program runs.I beleive that Repro takes less time than the programmatical updates/inserts.So even if the program abends, it is only the flat file that is affected. so you can restart it from the top and create a fresh copy again.

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
emadhubabu
Beginner


Joined: 03 Sep 2005
Posts: 13
Topics: 6

PostPosted: Wed May 06, 2009 4:31 pm    Post subject: Reply with quote

If we are not using MQCMIT .. and Batch job goes down.. no messages will be written to MQ????
Back to top
View user's profile Send private message
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