I have to code a COBOL Program to fetch the records from a DB2 table.
Every fetched record needs to be inserted to another Db2 Table & also be written to MQ.
I am thinking to have Commit/Restart Logic.
Please let me know the way i can achieve this
Its a Batch program. Also The records in MQ are set to trigger task once the MQ has record.
Actually my program has both Db2 Insert & MQPUT.
So need ur suggestion in inluding Commit/Restart logic in my program.
I believe that only issuing MQPUT command will not write a record to MQ unless SRRCMIT is issued or that paritcular program(unit of work) has ompleted. Pls confirm if my understanding is correct.
I would like to rephrase my question on SRRCMIT:
At what instance a Record is actually being written to a MQ from a batch program?
I believe its only after SRRCMIT or when the program completes successfully.