Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to put the messages back to the MQ if abend?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
raveeshk17

New User


Joined: 29 Jul 2010
Posts: 2
Location: Hyderabad

PostPosted: Thu Aug 26, 2010 5:26 pm    Post subject: How to put the messages back to the MQ if abend?
Reply with quote

HI,

I am new working on MQ series.

I have a scenario where I am reading a MQ. AFter the message is successfully get from the MQ, and while processing the message and trying to insert it into DB2 tables, I got SOC4. When I see the message via MQmenu, I found that message deleted from the queue.

Is there any way I can roll back the MQGET call when I incur abend in the program?

Thanks in advance
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Aug 26, 2010 5:45 pm    Post subject:
Reply with quote

are you using RRSAF?

If not, how are you scheduling your COMMITs with db2 and mqs?
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1002
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Aug 26, 2010 5:53 pm    Post subject:
Reply with quote

This is fairly standard MQ processing.

Issue the MQGET with MQGMO-SYNCPOINT . If the application abends or issues a rollback, then the message is still available on the queue with the Backoutcount incremented. After a successful MQGET you should check the Backoutcount and, if => 1, then move the message elsewhere for action.

When an MQGET is issued, MQ just marks the message as 'unavailable' on the queue and doesn't remove it until the MQCMIT (or CICS SYNCPOINT &c.). In the event of a failure or rollback, the message is in simply marked 'available' and is in the exact same location as it had been previously.

A backoutcount > 1 suggests that this message has failed twice and is possibly the cause of the abend. As the message is likely now at the head of the queue, no further mesages will be processed until it has been removed (by issuing a commit).

Garry.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Aug 26, 2010 6:19 pm    Post subject:
Reply with quote

also, what environment? Batch, CICS?
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1002
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Aug 26, 2010 6:26 pm    Post subject:
Reply with quote

Processing is the same regardless of environment. Use environment's two-phase commit where available.

Garry.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Aug 26, 2010 7:05 pm    Post subject:
Reply with quote

Quote:
Processing is the same regardless of environment. Use environment's two-phase commit where available


No, it is not.
in cics you handle things much differently than in batch;
syncpoints is a very big difference, since they don't like you issuing COMMITs in CICS.
and that is why I asked about RRSAF.

and obviously, you always attempt to use the two-phase commit.........
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1002
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Aug 26, 2010 7:13 pm    Post subject:
Reply with quote

Dick,

The MQ process is the same. In CICS use an EXEC CICS SYNCPOINT which is that environment's two-phase commit (or EXEC CICS SYNCPPOINT ROLLBACK, if rolling back).

Garry.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Aug 26, 2010 7:28 pm    Post subject:
Reply with quote

The TS is working with MQS and DB2.
Back to top
View user's profile Send private message
raveeshk17

New User


Joined: 29 Jul 2010
Posts: 2
Location: Hyderabad

PostPosted: Fri Aug 27, 2010 12:24 pm    Post subject:
Reply with quote

Thanks a lot for the info.

It works now.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. ISREDIT Macro is not returning back t... nico_neoz CLIST & REXX 21 Sat Nov 18, 2017 7:40 pm
No new posts ASP3 ABEND IN CICS Vedant CICS 0 Fri Oct 20, 2017 3:18 pm
No new posts C03 ABEND sjiraga PL/I & Assembler 1 Thu Jun 01, 2017 4:51 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us