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 » Message comprised of smaller messages

Post new topic  Reply to topic
 Message comprised of smaller messages « View previous topic :: View next topic » 
Author Message
chetty
PostPosted: Fri Jun 09, 2006 11:48 am    Post subject: Message comprised of smaller messages Reply with quote

Newbie

Joined: 22 Mar 2006
Posts: 1

Hello All,

I am new to this forum and have experience with WBI for only 2 moths. So if I ask any dumb questions, please bear with me.

Overview of Problem

I am receiving a message from queue or another flow in this format

<Message>
<NwHeader>
</NwHeader>
<Payload>
HD01...........CB01............CB02.............CB03.............CB04............CB05
</Payload
</Message>

(Note: the dots "........." here represent data, I am just keeping it simple)

I am extracting the contents of the payload (Inputroot.XML.Message.NwHeader.Payload) and storing it in a CHARACTER variable.
Code:

DECLARE inputData CHARACTER
SET inputData = Inputroot.XML.Message.NwHeader.Payload;


So this is what I have in inputData
HD01...........CB01............CB02.............CB03.............CB04............CB05

To get HD01 recordtype, I would issue the following command

DECLARE hd01_val CHARACTER
hd01_val = SUBSTRING(inputData FROM 1 FOR 500)

To get CB01 recordtype, I would issue the following command

DECLARE cb01_val CHARACTER
cb01_val = SUBSTRING(inputData FROM 501 FOR 600)

Problem Specifics

Each of these HD01, CB01, CB02, CB03, CB04, CB05 are record types and each adhere to a separate message set. The occurrence of the records can be in any order and hence I cannot associate the entire incoming message to a message set. I have to parse out each record type and associate to a message set. The reason I would like to tie each to a message set and use a MRM parser is so that I can easily navigate the tree and get to my data without having to manually extract each piece of data from within a record set using SUBSTRING.

For example. The CBO1 record consists of FirstName, LastName, SSN, DOB and Address. each of these fields have a definite start and stop position which are defined in the copybook. I've imported the copybook and created a messageset.

And the question...
The problem I am having is that I am not able associate a message set and the parser to a variable - in the above case "cb01_val". Looks like the parser and message set are associated only to an incoming message or outgoing message. How do you handle such situations, where you have to parse out an incoming message and associate only a part of the incoming message to a message set? Any ideas would be greatly welcome
Back to top
View user's profile Send private message
JT
PostPosted: Fri Jun 09, 2006 11:55 am    Post subject: Reply with quote

Padawan

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

Use the CREATE statement with the DOMAIN and PARSE clauses.

For examples search for those keywords on this site.
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 » Message comprised of smaller messages
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.