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 » Dynamically setting output message propagation

Post new topic  Reply to topic
 Dynamically setting output message propagation « View previous topic :: View next topic » 
Author Message
JohnMichael
PostPosted: Fri Nov 16, 2007 1:37 am    Post subject: Dynamically setting output message propagation Reply with quote

Acolyte

Joined: 28 Feb 2007
Posts: 55

Hello All,
I am working on Message Broker 6.0 on windows xp machine.

I am working on a scenario where there is a need to set output propagation dynamically.

for propagating to output terminal, we use esql statement as

set OutputRoot.XML.ROOT.CHILD.SUBCHILD..........= 'SOME VALUE';
Now what is needed in my scenario is that I want to get the ROOT tag dynamically from database and set the output root.

let us consider that I want to propagate statement like this.

set databasevalue = 'OutMessage.date';
set OutputRoot.XML.databasevalue = CURRENT_TIMESTAMP;
so should i give in databasevalue place....

desired output----
<OutMessage><date>04.02.05 13:00:00</date></OutMessage>
when I am propagating, it is getting error "failed to locate constant"
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Nov 16, 2007 2:35 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Please post the full error message.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
shalabh1976
PostPosted: Fri Nov 16, 2007 3:25 am    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

Use the EVAL statement. Please be aware of performance implications.
_________________
Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
sourdas2
PostPosted: Fri Nov 16, 2007 3:56 am    Post subject: Reply with quote

Voyager

Joined: 21 Apr 2006
Posts: 90
Location: Kolkata,India

syntax would be
Code:

set OutputRoot.XML.{databasevalue} = CURRENT_TIMESTAMP;

_________________
Thanks and Warm Regards
Sourav
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
jefflowrey
PostPosted: Fri Nov 16, 2007 4:27 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

sourdas2 wrote:
syntax would be
Code:

set OutputRoot.XML.{databasevalue} = CURRENT_TIMESTAMP;


This only works for one level of the tree. So it won't work for "OutMessage.date", it will only work for "OutMessage" or "date".

A reference, on the other hand, could be used.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JohnMichael
PostPosted: Fri Nov 16, 2007 4:40 am    Post subject: Reply with quote

Acolyte

Joined: 28 Feb 2007
Posts: 55

Thank u I got the issue solved by using
EVAL('SET OutputRoot.XML.' || databaseValue || '=' || CAST(dt AS CHAR) );
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Nov 16, 2007 5:19 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

shalabh1976 wrote:
Please be aware of performance implications.

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Nov 16, 2007 1:26 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

jefflowrey wrote:
This only works for one level of the tree. So it won't work for "OutMessage.date", it will only work for "OutMessage" or "date".

But there's nothing to stop you using {} twice:
Code:
SET OutputRoot.XML.{OutMessage}.{date};

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
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 » Dynamically setting output message propagation
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.