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 » multiple message types per MQInput node supported?

Post new topic  Reply to topic
 multiple message types per MQInput node supported? « View previous topic :: View next topic » 
Author Message
nhanks
PostPosted: Thu Apr 15, 2004 11:33 am    Post subject: multiple message types per MQInput node supported? Reply with quote

Novice

Joined: 18 Dec 2001
Posts: 13

My MQInput node receives fixed-length messages - no delimiters. However, each message is a different structure.

For example I might receive msg 1 which looks like:
field1(8 chars in length)field2(2 chars in length)field3....

Then I might receive msg 2 which looks like:
field1(10 chars in length)field2(4 chars in length)field3....

I have modeled each of the different messages using the MRM parser and with either the TDS or CWF physical model.

However, unless I specifically indicate the exact message type on the MQInput node, parsing fails with an error of:
CWF Error : Unknown message type

The CWF parser or writer has received an unknown message type identifier in the message properties.
The specified message set ('OV4SLH0002001') does not contain a message type with this identifier.


In summary, I need to be able to support multiple message types with the MQInput node and I am not sure how to do this.

Thanks in advance.[/i]
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Apr 15, 2004 11:37 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You need to add an RFH2 header to each of your messages, and include in that header the information that tells the MQInput node which MRM formats to use.

Then, in your code, you need to do something to identify which message format has been used to parse the incoming data so that you are accessing the correct thing.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Lisa
PostPosted: Thu Apr 15, 2004 11:48 am    Post subject: Multi Format Reply with quote

Master

Joined: 07 Jun 2002
Posts: 287
Location: NJ

Or,
You can read the message in as a BLOB, Use a Compute node and search for a value in position X, use RouteToLabel for final processing.

Depending on where the data is coming from, the sender may not want to add RFH2 header!

Lisa
Back to top
View user's profile Send private message Send e-mail
nhanks
PostPosted: Thu Apr 15, 2004 1:00 pm    Post subject: Reply with quote

Novice

Joined: 18 Dec 2001
Posts: 13

If I use the BLOB method will I need to convert from Hex back to ASCII strings so that I can do normal string comparisons, etc?

If so, how do I do this? Is there something in ESQL that allows for this?
Back to top
View user's profile Send private message
Lisa
PostPosted: Thu Apr 15, 2004 1:16 pm    Post subject: messages Reply with quote

Master

Joined: 07 Jun 2002
Posts: 287
Location: NJ

You can use something like this:

If Cast(substring(InputBody."BLOB" from 21 for 3) as CHAR CCSID InputRoot.MQMD.CodedCharSetId) = '599' Then
Set myroute = '599';
Else
.....

Lisa
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Thu Apr 15, 2004 4:41 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

nhanks wrote:
If I use the BLOB method will I need to convert from Hex back to ASCII strings so that I can do normal string comparisons, etc?


Not necessarily. The various string functions work just fine on BLOB data. But when you are comparing values, you have to compare BLOB values. So any fixed constants you are comparing with have to be expressed as Hex values (or converted to Hex/BLOB values using a CAST first).
_________________
I am *not* the model of the modern major general.
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 » multiple message types per MQInput node supported?
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.