|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ Series in COBOL code question |
« View previous topic :: View next topic » |
Author |
Message
|
gsherin |
Posted: Wed May 30, 2007 12:51 pm Post subject: MQ Series in COBOL code question |
|
|
Newbie
Joined: 30 May 2007 Posts: 1
|
I am totally new to MQ and have to do coding for it for my job as part of a fire drill here. I need to know how I would code for my message to expire from a queue in 5 minutes using MQPUT command. I know MQGET can remove messages but we aren't using it for what we need. I think the expiry parm is set as a -1 binary value in the copybook we are using.
Thanks anybody for your help in advance. |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 30, 2007 1:02 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Expiry needs to be set in tenths of a second _________________ Honesty is the best policy.
Insanity is the best defence.
Last edited by Vitor on Wed May 30, 2007 11:44 pm; edited 1 time in total |
|
Back to top |
|
 |
Nigelg |
Posted: Wed May 30, 2007 1:33 pm Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
From the APR, MQMD, Expiry:
Quote: |
This is a period of time expressed in tenths of a second, set by the application that puts the message |
As a rather wild stab in the dark, and assuming you know how to code in COBOL (I am rather rusty myself)
Code: |
MOVE 3000 TO MQMD-EXPIRY.
|
Look in /usr/mqm/inc/CMQMD1L, the copybook which declares the MQMD V1 structure. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 30, 2007 11:53 pm Post subject: Re: MQ Series in COBOL code question |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
gsherin wrote: |
I think the expiry parm is set as a -1 binary value in the copybook we are using.
|
Ah - finally twigged what you're saying!
Expiry defaults to the value -1 (message doesn't expire). You need to set a value to the number of tenths of a second you want the message to last, using a syntax very much like that suggested (my COBOL is equally rusty).
Note that expired messages can remain on the queue past their expiry time, so queue depth won't immediately drop. This is normal behaviour. These expired messages are not visible to an MQGET and cannot be picked up by an application. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|