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

How to get the message id thats triggering my COBOL app?


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Kakis Ziliaskoudis

New User


Joined: 15 Jan 2021
Posts: 4
Location: Sweden

PostPosted: Thu Nov 18, 2021 7:51 pm
Reply with quote

Hi!
Intro:
We have a simple setup of MQ shown in figure one at https://www.ibm.com/docs/en/ibm-mq/8.0?topic=queuing-starting-mq-applications-using-triggers. (The trigger is also set on First but I want to change it to Every, because the reading app is only reading one message.)

It all works most of the time, but sometimes we get 2033 (No message available). We get this in about 0.1% of all messages, and it is quite annoying. As I understand from the documentation and other sources this is because the message has not yet been commited when I try to read it.

Bad coding today:
The solution we have today is that we send a reply based on the information in the actual message, but we have no solution to send a reply when technical errors occurs, like the 2033 error. I have discovered other potentially problems due to current solution, but I cant prove them due to bad logging. (On my fix list)

Our general need:
What I would like to do is, when the trigger monitor starts my IMS application, to get hold of the ID of the message that triggers my app. By doing this we can send a message to the sender telling them that "the message with id x could not be processed". The sender claims they have a log with the ID of the message generated by MQ. By doing this the sender can do whatever we agrees upon to do...

One solution specific to the 2033 error to have a WAIT in the MQGET, but that does not cover our general needs.

RTFM:
I get tons of information of the message sent to the Trigger Monitor, but none from Trigger Monitor to my IMS App.
STFW:
Same problem here. Drowned in information on stuff I can't use.

Follow up problem:
If I can get hold of the message id, I would need to read that specific message. Because a simple MQGET will give me whatever message in the queue. Right?

Follow up problem #2:
Should this post go to forum area "IMS DB/DC"?

Code:
It's always nice to see some code...
Code:
PROCEDURE DIVISION.
    ENTRY 'DLITCBL' USING ZAA ZAG
    CALL 'CBLTDLI' USING ZGU ZAA START-TRANS
   
    CALL 'IMSLOG' USING ZAA ZAG START-TRANS *> My customized logging

I get some useless info like time and user, but that's it....

Thank you for reading all the way down here^_^
// Kakis
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 -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Need to validate the field using cobol COBOL Programming 4
No new posts IDCAMS listcat service using cobol JCL & VSAM 1
No new posts Make cobol variable value a variable COBOL Programming 3
No new posts how to convert and use 1 bit hex-numb... COBOL Programming 10
No new posts VB file copy COBOL program gives erro... COBOL Programming 3
Search our Forums:

Back to Top