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 » Using MRM message to create multiple instances

Post new topic  Reply to topic
 Using MRM message to create multiple instances « View previous topic :: View next topic » 
Author Message
mmarq
PostPosted: Thu Oct 31, 2002 6:36 am    Post subject: Using MRM message to create multiple instances Reply with quote

Acolyte

Joined: 19 Sep 2002
Posts: 74
Location: Newton, MA

Hope the above made sense. I have a message set using MRM with multiple messages. In a compute node, I am bringing in one of the messages (called contact admin). For example sake, contact admin has the following elements:
contact admin.firstName
contact admin.lastName
contact admin.address

Add this message to my Input in the compute node and drag and element from it to the ESQL area it looks like:

"InputBody"."firstName"

I need to create multiple instances of this record in this compute node - e.g.,
contact admin[1].firstName, contact admin[2].firstName, contact admin[3].firstName;

How can I say up multiple unique copies of this message - something like -

set Environment.Variables.contact admin = "InputBody"."contact admin";
set Environment.Variables.contact admin = "InputBody"."contact admin";
(not right I'm sure but this is kind of what I'd like to do)

How do I refer to this message specifically?

Thanks,
Melissa
_________________
M Marquis
Back to top
View user's profile Send private message Visit poster's website AIM Address
kirani
PostPosted: Thu Oct 31, 2002 10:11 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Well first you have to tell MRM that this element repeats. This can be done by setting the Repeat property to Yes in Connection tab. WMQI can handle 2 types of repeat,
1. an Element repeats fixed number of times.
2. An element repeats "N" times, where "N" is an interger variable, which is defined before this repeating element.

Now create a Type/group element contact admin, which contains firstname, lastname and address, then create an element (contact admin) of this type.
Now create another type element RECORD_TYPE which contains contact admin element. Set the repeating property for contact admin element to true and set the repeat count to some number (or you could create an integer element and use value of for repeat). Your input message will be of this type.

In a compute node you could use code similar to this to store N records into environment tree.

SET Environment.Variables = InputRoot.MRM;

With this statement complete group element will get copied into Environment tree. If you want to refer to each repeating record's elements use following esql,

SET ..... = InputRoot.MRM."contact admin"[CNT].firatname;

where CNT = 1 to N.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
mmarq
PostPosted: Sun Nov 03, 2002 5:02 am    Post subject: Reply Reply with quote

Acolyte

Joined: 19 Sep 2002
Posts: 74
Location: Newton, MA

Thanks very much for the info;

I'm not sure what you mean here:

"Now create a Type/group element contact admin, which contains firstname, lastname and address, then create an element (contact admin) of this type.
Now create another type element RECORD_TYPE which contains contact admin element. "

I have a compound type contact admin and a message of that type contact admin. I use the message in the compute node.

It sounds like I have to set the repeat property and do the following:

SET Environment.Variables = InputRoot.MRM;
SET ..... = InputRoot.MRM."contact admin"[CNT].firatname;


Or perhaps, I am missing something from the text I inserted above but did not understand completely.
_________________
M Marquis
Back to top
View user's profile Send private message Visit poster's website AIM Address
mmarq
PostPosted: Sun Nov 03, 2002 6:04 pm    Post subject: Reply with quote

Acolyte

Joined: 19 Sep 2002
Posts: 74
Location: Newton, MA

You said:
"This can be done by setting the Repeat property to Yes in Connection tab."

Where is the Connection tab? I don't see one in the Compute node.

Thanks,
Melissa
_________________
M Marquis
Back to top
View user's profile Send private message Visit poster's website AIM Address
kirani
PostPosted: Sun Nov 03, 2002 6:53 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Melissa,

Sorry if i wasn't clear enough in my earlier post. Connection tab is displayed for MRM elements under Message Set view.

You could set repeat property for an element, so you will have to first create an element of contact admin. Your message contact admin will be of some other type (RECRD_TYPE), as explained earlier it should also have an integer element to indicate how many times contact admin is repeating. so finally you will have these ..

Type : contact admin
contains ....
Elements: firstName, lastName, address.

create new element
Element: contact admin of Type contact admin.

create a new element to hold count ..
Element: RepeatCount (Integer).

now create a new type
Type: RECORD_TYPE
which will contain following elements in order
Element: RepeatCoun, contact admin

create a new message contact admin of type RECORD_TYP.

After you expand RECORD_TYPE element, click on contact admin element and then clcik on Connection tab in the message set, you could set the repeat property to true, in CWF tab set Repeat type to ValueOf RepeatCount element.

Your input data should always have counter in the beginning,

xxxxFNAME1LNAME1ADD1FNAME2LNAME2ADD2FNAME3LNAME3ADD3....
where xxxx is a 4 byte integer count.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Using MRM message to create multiple instances
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.