View previous topic :: View next topic |
Author |
Message |
Jeba Beginner

Joined: 02 Dec 2002 Posts: 48 Topics: 9 Location: Columbus, GA
|
Posted: Fri Jan 31, 2003 5:35 pm Post subject: How to commit an unit of work in COBOL (Batch program) |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Fri Jan 31, 2003 6:16 pm Post subject: |
|
|
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 |
|
 |
emadhubabu Beginner

Joined: 03 Sep 2005 Posts: 13 Topics: 6
|
Posted: Wed May 06, 2009 4:31 pm Post subject: |
|
|
If we are not using MQCMIT .. and Batch job goes down.. no messages will be written to MQ???? |
|
Back to top |
|
 |
|
|