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 » Usage of Default Values within CWF Message Set

Post new topic  Reply to topic
 Usage of Default Values within CWF Message Set « View previous topic :: View next topic » 
Author Message
harish_td
PostPosted: Mon Feb 18, 2008 6:15 pm    Post subject: Usage of Default Values within CWF Message Set Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

All,

I have a XML to CWF flow. The copybook(CWF Output) is a fairly big one considering that it has a lot of fields.
During the course of transformation we would initialize zeros/spaces to all the fields that were mandatory in the copybook but no values would be assigned to them for useful business mapping.

Ex:
SET OR.field1 = '';
SET OR.field2 = IR.MRM.XMLField1;
SET OR.field3 = 0;
SET OR.field4 = CAST(IR.MRM.XMLField2 AS INTEGER);
.
.
.
SET OR.field999 = '';
and so on

This works fine except that we have to re-do the initializations over and over again for every project in which this message set is used.

In order to overcome this i assigned default values to each field in the message set. Space for Strings and 0 for integers.

So in my flow i earlier had MQInput --> Compute --> MQOutput

I would like to add that the compute node now has code that maps the fields that are necessary for our business.

Now i have MQInput --> Compute --> ResetContentDescriptor --> MQOutput.

The fields not necessary to the specific requirement are not created at all. Since the message set has defaults set within them, every absent field would be populated by its default value at the o/p of the RCD Node.
Voila!! it works fine.

As per the MB Bible(Info-centre), it is perfectly legal to do so as the RCD merely reparses the message with the parser specified
(In my case CWF to CWF re-parsing)

Is my understanding right or am i unknowingly creating a bug? Do let me know if there is another way of overcoming lengthy initialization statements within ESQL.

Thanks in Advance,
Harish
Back to top
View user's profile Send private message Yahoo Messenger
kimbert
PostPosted: Tue Feb 19, 2008 2:13 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
the RCD merely reparses the message with the parser specified
(In my case CWF to CWF re-parsing)

It depends what you mean by 're-parse'. The RCD node simply sets some properties associated with the message and associates the specified parser with the message. If the parser supports on-demand parsing, no parsing will happen in the RCD node. Even if you force the parsing to occur ( by setting Parse Timing to 'Immediate' ) the MRM parser never uses defautl values when parsing. Not when parsing XML. Not when parsing CWF. Not when parsing TDS. So 'reparsing' will not cause default values to be used.

You should not need the RCD node. The CWF physical format always uses default values when writing a message, so you should get what you want using MQinput -> Compute -> MQOutput.
Back to top
View user's profile Send private message
harish_td
PostPosted: Wed Feb 20, 2008 2:01 am    Post subject: Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

Quote:
You should not need the RCD node. The CWF physical format always uses default values when writing a message, so you should get what you want using MQinput -> Compute -> MQOutput.


Thanks Kimbert. Was trying to see through the debugger instead of the destination queue
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Usage of Default Values within CWF Message Set
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.