IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SRRCMIT concept for MQ


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kunal jain

New User


Joined: 19 May 2011
Posts: 59
Location: India

PostPosted: Mon Mar 19, 2012 1:20 pm
Reply with quote

Hi,
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
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Mar 19, 2012 2:38 pm
Reply with quote

are you speaking of Batch or CICS?

have you bothered to read anything about RRSAF?

RRS
Back to top
View user's profile Send private message
kunal jain

New User


Joined: 19 May 2011
Posts: 59
Location: India

PostPosted: Mon Mar 19, 2012 3:04 pm
Reply with quote

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.
Back to top
View user's profile Send private message
kunal jain

New User


Joined: 19 May 2011
Posts: 59
Location: India

PostPosted: Mon Mar 19, 2012 4:17 pm
Reply with quote

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.
Please confirm
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Mar 19, 2012 5:03 pm
Reply with quote

as db2 has rows not records
mqs has messages not records,
files only have records......

the message is not available to other tasks until
an explicit commit
or
a successful end of task with only an implicit commit.

if you issue an explicit commit (and receive an error free return)
and afterwards your program abends, the messages will still be available to other tasks.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Mar 19, 2012 5:33 pm
Reply with quote

can not say it better than this

and here is another manual concerning rrs
Back to top
View user's profile Send private message
kunal jain

New User


Joined: 19 May 2011
Posts: 59
Location: India

PostPosted: Mon Mar 19, 2012 5:51 pm
Reply with quote

Thanks..my thinking was correct!
Thank you so much for the information & help!!

Much Appreciated
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts JCL overriding concept JCL & VSAM 14
No new posts Image copy concept DB2 6
No new posts Is the concept of Tracker site availa... DB2 1
No new posts The Concept of "IT"? General Talk & Fun Stuff 5
No new posts Concept clarification only - Cobol Db... DB2 9
Search our Forums:

Back to Top