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 » Creating the whole mrm Schema - is it possible?

Post new topic  Reply to topic
 Creating the whole mrm Schema - is it possible? « View previous topic :: View next topic » 
Author Message
Frik
PostPosted: Wed Nov 25, 2009 11:49 pm    Post subject: Creating the whole mrm Schema - is it possible? Reply with quote

Acolyte

Joined: 25 Nov 2009
Posts: 69

Hey,
I have a MRM message set.
In my flow - I want to create it all at once, where all the fields are null valued.
is there a "CREATE" statement that producing that result?
any other way to create the whole scheme at once?


Thanks in advance.
Frik
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Nov 26, 2009 1:16 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So you want to create an output message which contains all elements/attributes in the message definition? I presume you want default values to be applied to everything as well ( otherwise you would have to SET every field anyway, so no code saving ).

This has been requested before, In general it is a very tricky problem because a message definition can contain choices, optional fields, fields which repeat an unknown number of times etc.

I expect your message definiton is a simple one - just a sequence of required simple fields. There is a way to get what you need - although you will burn quite a lot of CPU. Create an empty output tree and ask the CWF or TDS parser to serialize it as a fixed-length message. Because the message format is fixed-length, the writer will put in the default values for you. Then parse the fixed-length message using the CWF/TDS parser and you have a fully-populated message tree.
Back to top
View user's profile Send private message
Frik
PostPosted: Thu Nov 26, 2009 7:34 am    Post subject: Reply with quote

Acolyte

Joined: 25 Nov 2009
Posts: 69

kimbert wrote:
So you want to create an output message which contains all elements/attributes in the message definition? I presume you want default values to be applied to everything as well ( otherwise you would have to SET every field anyway, so no code saving ).

This has been requested before, In general it is a very tricky problem because a message definition can contain choices, optional fields, fields which repeat an unknown number of times etc.

I expect your message definiton is a simple one - just a sequence of required simple fields. There is a way to get what you need - although you will burn quite a lot of CPU. Create an empty output tree and ask the CWF or TDS parser to serialize it as a fixed-length message. Because the message format is fixed-length, the writer will put in the default values for you. Then parse the fixed-length message using the CWF/TDS parser and you have a fully-populated message tree.


Kimbert, thanks for your quick answer.
is it the only way?
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Nov 26, 2009 8:04 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You could cache a full-populated message tree in a shared row variable, and take a new copy of it every time the flow is invoked. As it would be created once when the execution group starts, you could create it by parsing an XML message.
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 » Creating the whole mrm Schema - is it possible?
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.