ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » MQ Series in COBOL code question

Post new topic  Reply to topic
 MQ Series in COBOL code question « View previous topic :: View next topic » 
Author Message
gsherin
PostPosted: Wed May 30, 2007 12:51 pm    Post subject: MQ Series in COBOL code question Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed May 30, 2007 1:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
Nigelg
PostPosted: Wed May 30, 2007 1:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed May 30, 2007 11:53 pm    Post subject: Re: MQ Series in COBOL code question Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » MQ Series in COBOL code question
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.