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 » Help in building WMQI message for Publications for JMS topic

Post new topic  Reply to topic
 Help in building WMQI message for Publications for JMS topic « View previous topic :: View next topic » 
Author Message
schroederms
PostPosted: Wed Jan 07, 2004 11:57 am    Post subject: Help in building WMQI message for Publications for JMS topic Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

I have a question on how to do some JMS specific MQRFH2
header fields setting. I've never built a message for
JMS listeners before, so I maybe going down totally
the wrong path here.

Anyway,
I've used the Publication node before to put messages
via topics not JMS topics, and that works fine, but now
I'm wanting to replace a JAVA application
that all it does is read a table every 5 minutes and publish
messages from a specific table. A perfect fit for WMQI flow
with a TIMER fron end, so I've started to build the MQRFH2
header that is currently coming out of the JAVA application
program that uses JMS ( Also, the consumer for this message
also uses JMS and is listening to the topic partners/Publications.)


The output #1 below is from the JMS application
I'm trying to replicate.
The output #2 is from my compute node code.

As you can see, once I get to the "mcd" layer and below it's messed up.

CAN ANYONE GIVE ME SOME HELP ?
Or is there a better way to do this ?

Thanks,
Mike


**** My compute node sql.

DECLARE I INTEGER;
SET I = 1;
WHILE I < CARDINALITY(InputRoot.*[]) DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.

SET OutputRoot.MQMD.Format ='MQHRF2 ';
SET OutputRoot.MQMD.CodedCharSetId=1208;
SET OutputRoot.MQMD.Encoding=546;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format='MQSTR';
SET OutputRoot.MQRFH2.(MQRFH2.Field)Encoding=273;
SET OutputRoot.MQRFH2.(MQRFH2.Field)CodedCharSetId=InputRoot.MQMD.CodedCharSetId;
SET OutputRoot.MQRFH2.(MQRFH2.Field)CodedCharSetId=1208;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Flags=0;
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID=1208;
SET OutputRoot.MQRFH2.(MQRFH2.Field)mcd.(MQRFH2.Field).Msd='jms_text';
SET OutputRoot.MQRFH2.(MQRFH2.Field)jms.(MQRFH2.Field).Dst='topic://partners/Publications';
SET OutputRoot.MQRFH2.(MQRFH2.Field)jms.(MQRFH2.Field).Dlv=2;



#1. ***** Currently coming from a JMS application .

(0x1000000)MQRFH2 = (
(0x3000000)Version = 2
(0x3000000)Format = 'MQSTR '
(0x3000000)Encoding = 273
(0x3000000)CodedCharSetId = 1208
(0x3000000)Flags = 0
(0x3000000)NameValueCCSID = 1208
(0x1000000)mcd = (
(0x1000000)Msd = (
(0x2000000) = 'jms_text'
)
)
(0x1000000)jms = (
(0x1000000)Dst = (
(0x2000000) = 'topic://partners/Publications'
)
(0x1000000)Tms = (
(0x2000000) = '1073495945013'
)
(0x1000000)Dlv = (
(0x2000000) = '2'
)
)

#2. ***** What I am producing from my compute node.

(0x1000000)MQRFH2 = (
(0x3000000)Format = 'MQSTR'
(0x3000000)Encoding = 273
(0x3000000)CodedCharSetId = 1208
(0x3000000)Flags = 0
(0x3000000)NameValueCCSID = 1208
(0x3000000)mcd = NULL
(
(0x3000000) = NULL
(
(0x1000000)Msd = (
(0x2000000) = 'jms_text'
)
)
(0x1000000)Msd = (
(0x2000000) = 'xml'
)
)
(0x3000000)jms = NULL
(
(0x3000000) = NULL
(
(0x1000000)Dst = (
(0x2000000) = 'topic://partners/Publications'
)
(0x1000000)Dlv = (
(0x2000000) = 2
)
)
)
)
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Jan 07, 2004 12:48 pm    Post subject: Reply with quote

Jedi

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

Take out the 'MQRFH2.Field' on everthing that is in the Name/Value pairs:

Code:
SET OutputRoot.MQRFH2.mcd.Msd='jms_text';
SET OutputRoot.MQRFH2.jms.Dst='topic://partners/Publications';
SET OutputRoot.MQRFH2.jms.Dlv=2;


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
schroederms
PostPosted: Fri Jan 09, 2004 11:43 am    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

Thanks EddieA,

Now for whatever reason, my Format under MQRFH2 is not getting set. Do you know why that would be ?

Here is the code:
DECLARE I INTEGER;
SET I = 1;
WHILE I < CARDINALITY(InputRoot.*[]) DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.

SET OutputRoot.MQMD.Format ='MQHRF2 ';
SET OutputRoot.MQMD.CodedCharSetId=1208;
SET OutputRoot.MQMD.Encoding=546;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version=2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format='MQSTR';
SET OutputRoot.MQRFH2.(MQRFH2.Field)Encoding=273;
SET OutputRoot.MQRFH2.(MQRFH2.Field)CodedCharSetId=1208;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Flags=0;
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID=1208;
SET OutputRoot.MQRFH2.mcd.Msd='jms_text';
SET OutputRoot.MQRFH2.jms.Dst='topic://partners/Publications';
SET OutputRoot.MQRFH2.jms.Dlv=2;


Here is the results :
(0x1000000)MQRFH2 = (
(0x3000000)Version = 2
(0x3000000)Format = ''
(0x3000000)Encoding = 273
(0x3000000)CodedCharSetId = 1208
(0x3000000)Flags = 0
(0x3000000)NameValueCCSID = 1208
(0x1000000)mcd = (
(0x1000000)Msd = (
(0x2000000) = 'jms_text'
)
)
(0x1000000)jms = (
(0x1000000)Dst = (
(0x2000000) = 'topic://partners/Publications'
)
(0x1000000)Dlv = (
(0x2000000) = 2
)
)
)



Thanks,
Mike
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jan 09, 2004 11:59 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

schroederms wrote:
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format='MQSTR';
This is the wrong value for MQFMT_STRING. It should be 'MQSTR ' (with three spaces after it). You can use MQFMT_STRING instead of the actual value.

You may want to do this with 'MQHRF2', as well.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
schroederms
PostPosted: Fri Jan 09, 2004 12:08 pm    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

Thanks Jeff,
But I had that coded with three spaces at one time, but with sthe same results. I tried your suggestion with the same results:
(Since original posting I added a MQRFH build as well)

My code:SET OutputRoot.MQMD.Format ='MQHRF ';
SET OutputRoot.MQMD.CodedCharSetId=1208;
SET OutputRoot.MQMD.Encoding=546;
SET OutputRoot.MQRFH.Version=1;
SET OutputRoot.MQRFH.Encoding=273;
SET OutputRoot.MQRFH.CodedCharSetId=819;
SET OutputRoot.MQRFH.Format='MQHRF2 ';
SET OutputRoot.MQRFH.Flags=0;
SET OutputRoot.MQRFH.UNIQUE_CONNECTION_ID='';
SET OutputRoot.MQRFH.MQPSCommand='Publish';
SET OutputRoot.MQRFH.MQPSTopic='partners/Publications';
SET OutputRoot.MQRFH.MQPSPubOpts='NoReg';


SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID=1208;
SET OutputRoot.MQRFH2.mcd.Msd='jms_text';
SET OutputRoot.MQRFH2.jms.Dst='topic://partners/Publications';
SET OutputRoot.MQRFH2.jms.Dlv=2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version=2;
[color=red]SET OutputRoot.MQRFH2.(MQRFH2.Field)Format=MQFMT_STRING;

SET OutputRoot.MQRFH2.(MQRFH2.Field)Encoding=273;
SET OutputRoot.MQRFH2.(MQRFH2.Field)CodedCharSetId=1208;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Flags=0;
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID=1208;
SET OutputRoot.MQRFH2.mcd.Msd='jms_text';
SET OutputRoot.MQRFH2.jms.Dst='topic://partners/Publications';
SET OutputRoot.MQRFH2.jms.Dlv=2; [/color]

The results:
(0x1000000)MQRFH = (
(0x3000000)Version = 1
(0x3000000)Encoding = 273
(0x3000000)CodedCharSetId = 819
(0x3000000)Format = 'MQHRF2'
(0x3000000)Flags = 0
(0x3000000)UNIQUE_CONNECTION_ID = ''
(0x3000000)MQPSCommand = 'Publish'
(0x3000000)MQPSTopic = 'partners/Publications'
(0x3000000)MQPSPubOpts = 'NoReg'
)
(0x1000000)MQRFH2 = (
(0x3000000)NameValueCCSID = 1208
(0x1000000)mcd = (
(0x1000000)Msd = (
(0x2000000) = 'jms_text'
)
)
(0x1000000)jms = (
(0x1000000)Dst = (
(0x2000000) = 'topic://partners/Publications'
)
(0x1000000)Dlv = (
(0x2000000) = 2
)
)
(0x3000000)Version = 2
([color=red]0x3000000)Format = ''

(0x3000000)Encoding = 273
(0x3000000)CodedCharSetId = 1208
(0x3000000)Flags = 0
)[/color]
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Jan 09, 2004 1:31 pm    Post subject: Reply with quote

Jedi

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

I think that's because you don't actually have any payload. I've seen a reference to this somewhere, but I can't remember where, that WMQI has some 'intelligence' when it comes to setting the Formats. As you haven't actually got any data, then the contents of Format don't matter.

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
schroederms
PostPosted: Tue Jan 13, 2004 7:00 am    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

That was it Eddie, Thanks for everyones help. Mike
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 » Help in building WMQI message for Publications for JMS topic
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.