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 » Copying a specific message off a queue

Post new topic  Reply to topic Goto page 1, 2  Next
 Copying a specific message off a queue « View previous topic :: View next topic » 
Author Message
DELLIPIZ
PostPosted: Mon May 15, 2006 11:17 am    Post subject: Copying a specific message off a queue Reply with quote

Acolyte

Joined: 08 Oct 2003
Posts: 70

Hi Everyone,

I need to be able to pull a specific message off of a queue and load it to another queue.

I know about CSQUTIL to do a COPY and then a LOAD, but this is copying all the messages off the queue and I need to be able to copy specific messages.

I was even hoping that I would be able to edit the output data from the CSQUTIL COPY, but I guess we can't do that.

Does anyone know of a utility that will allow me to do that? For example, I need something that allows me to copy message 5 from queue1 and copy it to queue2.

Thanks!

-Lori
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon May 15, 2006 11:33 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

If you know the messageID or correlID, you can use the zOS version of the 'q' program (supportpac ma01) to move a specific message from one queue to another.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
JT
PostPosted: Mon May 15, 2006 11:36 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

You could do this easily using the RFHUTIL/C utility, but since you referenced CSQUTIL, I'm not sure if RFHUTIL/C can access z/OS queues.
Back to top
View user's profile Send private message
DELLIPIZ
PostPosted: Mon May 15, 2006 11:43 am    Post subject: Reply with quote

Acolyte

Joined: 08 Oct 2003
Posts: 70

Hi,

Yes, I will know the messageid, but is that program something that can be run via JCL on MVS.

Thanks!

-Lori
Back to top
View user's profile Send private message
kevinf2349
PostPosted: Mon May 15, 2006 12:18 pm    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

Lori

I could be wrong but I think you are going to have to write your own code for this.

What is important about the message? Do you have any control other the queue it is ending up in? What I am driving at is why not just put it into a seperate queue from the get go?
Back to top
View user's profile Send private message
DELLIPIZ
PostPosted: Mon May 15, 2006 12:23 pm    Post subject: Reply with quote

Acolyte

Joined: 08 Oct 2003
Posts: 70

Hi Kevin,

This is for our reprocessing logic. Queue1 contains messages that failed. Queues2 is an input queue for our reprocessing logic. I only want to reprocess certain messages. So I need a utility that allows me to specify which message I want to move from Queue1 to Queue2.

Does that make sense?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon May 15, 2006 12:45 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

wschutz wrote:
you can use the zOS version of the 'q' program (supportpac ma01) to move a specific message from one queue to another.

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon May 15, 2006 3:13 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Code:

[wschutz@wschutz zOS]$ ll
total 1168
-rwxr-xr-x  1 wschutz wschutz     418 Nov 20 17:18 q.jcl
-rwxr-xr-x  1 wschutz wschutz 1169600 Nov 12  2005 q.seq
[wschutz@wschutz zOS]$ cat q.jcl
//JOBLIB   DD DSN=HUGHSON.Q.LOAD,DISP=SHR
//         DD DSN=MQLIB.SCSQAUTH,DISP=SHR
//         DD DSN=MQLIB.SCSQANLE,DISP=SHR
//********************************************************************
//* Example of how to pass parms to Q in Batch                       *
//********************************************************************
//Q        EXEC PGM=Q,PARM=('-mMQ23 -oQ1 -ap -M"Message0" -v5 -dh')
//

_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
jefflowrey
PostPosted: Mon May 15, 2006 3:19 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

wschutz wrote:
JOBLIB DD DSN=HUGHSON.Q.LOAD,DISP=SHR


_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kevinf2349
PostPosted: Mon May 15, 2006 5:55 pm    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA



I guess it is time for me to review the support packs again. I didn't realise the M071 was supported on z/OS now. Great news. Thanks.
Back to top
View user's profile Send private message
DELLIPIZ
PostPosted: Mon May 15, 2006 9:16 pm    Post subject: Reply with quote

Acolyte

Joined: 08 Oct 2003
Posts: 70

Hi,

So if I want to take a copy of a message with correl id 20060503085624418793GCS off of queue 1 (Q1) on queue manager (QM) and put it to queue 2 (Q2), would this be correct?

//Q EXEC PGM=Q,PARM=('-mQM -iQ1 -oQ2
-gc20060503085624418793GCS ')


Also, can I do it by message number in the queue? So if I want to take a copy of message #5 from queue 1 (Q1) on queue manager (QM) and put it to queue 2 (Q2), is there anyway to do that? If so, what would my PARM look like?

As always, thanks!

-Lori
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon May 15, 2006 11:10 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
//Q EXEC PGM=Q,PARM=('-mQM -iQ1 -oQ2
-gc20060503085624418793GCS ')

The "space" at the end might be a problem. You may have to use the hex version.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
DELLIPIZ
PostPosted: Tue May 16, 2006 4:22 am    Post subject: Reply with quote

Acolyte

Joined: 08 Oct 2003
Posts: 70

Hi,

So you think the following should do it?

//Q EXEC PGM=Q,PARM=('-mQM -iQ1 -oQ2
-gxcF2F0F0F6F0F5F0F3F0F8F5F6F2F4F4F1F8F7F9F3C7C3E240')

Also, is there a way for me to copy multiple messages? Meaning if I want to send over messages with either correlation id:
F2F0F0F6F0F5F0F3F0F8F5F6F2F4F4F1F8F7F9F3C7C3E240
and
F2F0F0F6F0F5F0F3F0F8F5F6F2F4F4F1F8F7F9F3C7C3E2E2 ???

Thanks!

-Lori
Back to top
View user's profile Send private message
wschutz
PostPosted: Tue May 16, 2006 6:17 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

To do that, I think you need to run "q" twice....
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
DELLIPIZ
PostPosted: Wed May 17, 2006 12:10 pm    Post subject: Reply with quote

Acolyte

Joined: 08 Oct 2003
Posts: 70

Hi,

I'm liking this utility so far.

However, sometimes in my JCL, I get the following message:
EXCESSIVE PARAMETER LENGTH IN THE PARM FIELD

Any idea what the max can be?

Thanks!

-Lori
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » Copying a specific message off a queue
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.