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 » WebSphere Message Broker (ACE) Support » pub/sub messages by hand

Post new topic  Reply to topic
 pub/sub messages by hand « View previous topic :: View next topic » 
Author Message
pomeroy8
PostPosted: Thu Apr 11, 2002 1:19 pm    Post subject: Reply with quote

Novice

Joined: 25 Jun 2001
Posts: 21
Location: Markham, ON Canada

I am trying to send messages to the MA0C pub/sub broker. This requires messages formated in the MQRFH header. Ultimately, we will be writing a program using JMS or AMI. In the mean time, we have some questions about how it operates. I am using your SupportPac tool IH02, to try to send the appropriate "Register Publisher" (RegPub) to the MA0C control queue.

I seem to be populating the MQRFH header succesfully, with the exception of the NameValueString (of course the one I really need). Any suggestions appreciated.

Thanks.


I used following message:
-----
OPTIONS
DELIMITER %%
OPENOPTIONS 16
DEBUGLEVEL 1

TESTSTART

MQMD
MSGTYPE 8
FORMAT MQHRF

MQRFH
STRUCID MQRFH_STRUC_ID
VERSION 1
STRUCLENGTH 128
ENCODING MQENC_NATIVE
CODEDCHARSETID MQCCSI_INHERIT
FORMAT MQFMT_NONE
FLAGS MQRFH_NONE
NAMEVALUESTRING
STARTDATA
MQPS_COMMAND "RegPub" MQPSTopic "EARTH/Season"
ENDDATA

STARTDATA
TEST PUBLICATION DATA GOES HERE: SPRING

ENDDATA

TESTEND
----
I get the following result:
----

Time: 14:57:49 Date: 11/04/02

program started
Debuglvl: 1
Record read:
Record read: TESTSTART

Record read:

Record read: MQMD

Record read: MSGTYPE 8
MQMD message type: 8

Record read: FORMAT MQHRF
MQMD Format: MQHRF

Record read:

Record read: MQRFH

Record read: STRUCID MQRFH_STRUC_ID
MQRFH StrucId: MQRF

Record read: VERSION 1
MQRFH Version: 1

Record read: STRUCLENGTH 128
MQRFH StrucLength: 128

Record read: ENCODING MQENC_NATIVE
MQRFH Encoding: 0

Record read: CODEDCHARSETID MQCCSI_INHERIT
MQRFH CodedCharSetId: 0

Record read: FORMAT MQFMT_NONE
MQRFH Format: MQFMT_NO

Record read: FLAGS MQRFH_NONE
MQRFH Flags: 0

Record read: NAMEVALUESTRING
Input file in error -- Keyword (possibly STARTDATA) missing or out of order


MQSIPUT FAILURE
Back to top
View user's profile Send private message
vmcgloin
PostPosted: Fri Apr 12, 2002 12:37 am    Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

Use NAMEVALUEDATA instead of NAMEVALUESTRING.

Cheers,
Vicky
Back to top
View user's profile Send private message
pomeroy8
PostPosted: Fri Apr 12, 2002 5:32 am    Post subject: Reply with quote

Novice

Joined: 25 Jun 2001
Posts: 21
Location: Markham, ON Canada

Vicky, thanks for the reply. The NameValueData field is actually part of the MQRFH2 header. However, I triied it anyway with the same result.

Thanks again.
Back to top
View user's profile Send private message
vmcgloin
PostPosted: Fri Apr 12, 2002 6:03 am    Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

Same result - as in failure?
Sorry, I just double checked & the file I was looking at was RFH2.

One more suggestion:
I don't remember what the default text delimiter is, but it might be ".
Try setting TEXTDELIMITER ' in your OPTIONS & put that around your namevaluestring.



[ This Message was edited by: vmcgloin on 2002-04-12 07:06 ]
Back to top
View user's profile Send private message
pomeroy8
PostPosted: Fri Apr 12, 2002 7:40 am    Post subject: Reply with quote

Novice

Joined: 25 Jun 2001
Posts: 21
Location: Markham, ON Canada

Thanks Vicky.

Yes, I meant that the error was the same for NameValueString and NameValueData.

I did try the TEXTDELIMITER. Still getting same error. Arghhh!!!!

Anyway messed around with the file .... removed STARTDATA/ENDDATA tags
and went with:
STRUCLENGTH 94
NAMEVALUESTRING 'MQPS_COMMAND "RegPub" MQPSTopic "EARTH/Season"'

[snip]

STARTDATA
'TEST PUBLICATION DATA GOES HERE: SPRING'
ENDDATA

In this case, the struclength parameter causes the header to be the correct length and the message body to be "TEST PUBLICATION ..." I am using the IH03 supportpac utility to browse the queue. The RFH header is on the message, however, I didn't see the NAMEVALUESTRING in it.

The purpose of this exercise is to send a pub/sub command to MA0C so, I sent the message to the SYSTEM.BROKER.CONTROL.QUEUE. Unfortunately, as I expected the publication was not registered.

Thanks for help.

Back to top
View user's profile Send private message
pomeroy8
PostPosted: Fri Apr 12, 2002 10:38 am    Post subject: Reply with quote

Novice

Joined: 25 Jun 2001
Posts: 21
Location: Markham, ON Canada

I got it to work!!!! Kept pluging away at MQRFH header. I was triing to get the Error Code from the MA0C broker by specifying the RepyTo QMgrName and QName. As it happened I didn't get a reply message, however running the AMQSPSD -m EARTH command listed my publication!

I used the following input file for MQSIPUT (IH02)

MQSIPUT SYSTEM.BROKER.CONTROL.QUEUE EARTH < RFH_REGPUB.TXT

# Specify the options
#
OPTIONS
DEBUGLEVEL 1
DELIMITER %%
TEXTDELIMITER '
OPENOPTIONS 16

# Start the test
#
TESTSTART

# Add the MQMD
#
MQMD
MSGTYPE 8
FORMAT MQHRF

# Add the MQRFH
#
MQRFH
STRUCID 'RFH '
VERSION 1
#USE VALUE FROM RULER ABOVE NAME VALUE STRING THE | INDICATE 4 BYTE BOUNDARIES
STRUCLENGTH 112
# ENCODING 0
CODEDCHARSETID 437
FORMAT ' '
FLAGS 0
STARTDATA
'MQPSCommand "RegPub" MQPSQMgrName EARTH MQPSQName MOON MQPSTopic "EARTH/Season" '
ENDDATA

# Add the message data
#
STARTDATA
'MQPSCommand "RegPub" MQPSQMgrName EARTH MQPSQName MOON MQPSTopic "EARTH/Season" '
ENDDATA

# End the test
#
TESTEND

Thanks for your help. Perserverence pays off!

Leigh
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 » WebSphere Message Broker (ACE) Support » pub/sub messages by hand
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.