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 » Help in Setting Destination Labels

Post new topic  Reply to topic
 Help in Setting Destination Labels « View previous topic :: View next topic » 
Author Message
LH33
PostPosted: Thu Jun 05, 2003 10:34 am    Post subject: Help in Setting Destination Labels Reply with quote

Master

Joined: 21 Nov 2002
Posts: 200

I have a requirement to set Destination Lables for Route To Label processing. I want to set the Label Names equal to the first verb in the XML. For Example, I will be getting XML with 3 different verbs:

<CreateJob revision="1.0.0" environment="Test" >
(rest of XML message)

<ChangeJob revision="1.0.0" environment="Test" >
(rest of XML message)

<CloseJob revision="1.0.0" environment="Test" >
(rest of XML message)

Can someone help me with the code to set the DestinationData[2]. Here is my current code:

SET OutputRoot = InputRoot;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname = 'CompleteFlow';
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[2].labelname = "InputRoot.XML.*[1]";

I want the DestinationData[2].labelname to be equal to the Highlighted verb shown above. Thanks for any help!!
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Jun 05, 2003 1:43 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Code:
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[2].labelname = InputRoot.XML.*[1] NAME


Notice I took the quotes out, as they don't really add any value, and notice that I specified NAME after the field reference. That says 'take the name of the field, not it's value'.

This may not work in 2.0 versions.
Back to top
View user's profile Send private message
LH33
PostPosted: Fri Jun 06, 2003 5:23 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2002
Posts: 200

Jeff,

Thank you so much!! Have a good one!!
Back to top
View user's profile Send private message
LH33
PostPosted: Fri Jun 06, 2003 7:44 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2002
Posts: 200

Jeff or anyone,

I put this code in and I am getting a syntax error:

SET OutputLocalEnvironment.Destination.RouterList.DestinationData[2].labelname = InputRoot.XML.*[1] NAME;

When I use quotes around it I get a BIP4240 error.

Can someone help with the syntax?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jun 06, 2003 9:08 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Are you looking to put quotes around the name of the tag inside the label? So that the label is "<double-quote><tag name><double-quote>"?

Or are you trying to do
Code:
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[2].labelname = "InputRoot"."XML".*[1] NAME;
?

Cause you don't need to do the later. Of course, I can't think of a good reason for doing the former, either - as putting them into the label means you have to retype them when you assign the property on the Label Node. BUT, if you wanted to do the former, then
Code:
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[2].labelname = '"'||InputRoot.XML.*[1] NAME||'"';
.

You may have to cast the name part as a character first.

And again, when you put your tag name into the property of your label node, you'll have to include the quotes for this to work. Otherwise you'll get an unknown label error at the RouteToLabel node.
Back to top
View user's profile Send private message
LH33
PostPosted: Fri Jun 06, 2003 9:13 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2002
Posts: 200

Jeff,

Thanks a lot for your help. I actually used the following code and it worked:

SET OutputLocalEnvironment.Destination.RouterList.DestinationData[2].labelname = FIELDNAME(InputRoot.XML.*[1]);

Thanks!! Lisa
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 » Help in Setting Destination Labels
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.