|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Creating an instance of a MRM message in the Environment tre |
« View previous topic :: View next topic » |
Author |
Message
|
fitzcaraldo |
Posted: Mon Oct 06, 2003 4:38 am Post subject: Creating an instance of a MRM message in the Environment tre |
|
|
Voyager
Joined: 05 May 2003 Posts: 98
|
Hello,
I have a MRM definition of a message and want to create a instance of that message using the default values for each field. I want to create it in the Environment tree rather than the output message. I am trying to use the following code:
Code: |
set Environment.variables.DummyMessage = '01234012345678901234567890123401234567890123456789';
create firstchild of Environment.variables.DefautMessage domain 'MRM' parse(Environment.variables.DummyMessage,
InputRoot.MQMD.Encoding, InputRoot.MQMD.CodedCharSetId, Environment.variables.MessageSet,
Environment.eaiSplicer.MessageType, Environment.variables.MessageFormat);
|
Is it possible to do this without providing the dummy message? I don't like this approach as it has to be exactly the right length and doesn't substitute default values.
Do I have to build the message in the Output tree to get it to fill the default values? |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Oct 06, 2003 4:45 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The CREATE FIELD... PARSE is used to, umm, Parse a bitstream into a message tree. So it kinda needs a bitstream to work from.
You might be able to get it to supply default values if you populate your bitstream with the Logical Null values in the places you want defaults. Your sample looked like it had data supplied for all your fields. Try replacing what you've got with all zeros(since your record seems to be all numbers). _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fitzcaraldo |
Posted: Mon Oct 06, 2003 9:33 pm Post subject: |
|
|
Voyager
Joined: 05 May 2003 Posts: 98
|
Thanks Jeff, point taken.
I had no luck trying to build the message with defaults in the Environment tree.
However, I did get it going as follows:
- a compute node which sets the Property tree to the required MessageSet, etc and set OutputRoot.MRM = ''
- an RCD to blob
- a second compute node which does create field.. parse of the incoming blob back to the Message Set.
A bit convoluted but it works. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|