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 » user defined esql: function in Mapping Node

Post new topic  Reply to topic
 user defined esql: function in Mapping Node « View previous topic :: View next topic » 
Author Message
vinod_sri
PostPosted: Wed Jul 04, 2007 6:55 am    Post subject: user defined esql: function in Mapping Node Reply with quote

Apprentice

Joined: 10 Dec 2003
Posts: 42
Location: Atlanta

Hi,

I have two issues in handling the Mapping Node. I am very much in need of your advise and help in resolving them.

1. Can anyone please tell me where to write and how to execute an user defined esql: function in a Mapping Node? I have added an .esql file to my project and written a function. But seems it is not working that way. Somehow somewhere I am not doing it right.

2. My requirement is to write an esql: function which can let me navigate to the any desired Tag in an array of Tags. I coundn't find any function or a way to use cardinality in the mapping node. Please tell me how to implement cardinality in Mapping Node as we do it in Compute Node.

Thanks a lot,

Vinod
Back to top
View user's profile Send private message Send e-mail
SOLOHERO
PostPosted: Wed Jul 04, 2007 8:05 pm    Post subject: Mapping node Reply with quote

Centurion

Joined: 01 Feb 2007
Posts: 107

I dont think you can do such thing in mapping node, if i am not wrong that was why compute node is for,and one way i think is when you click in the mapping node refer it to the esql file that you created.
_________________
Thanks
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Thu Jul 05, 2007 2:22 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You certainly can call an ESQL function from a mapping node.

You just put in "esql:" and the name of the function and then the arguments.

I'm too lazy to actually spend half a minute digging up the references in the Info Center - but I know there's a page or so about doing this.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
vinod_sri
PostPosted: Thu Jul 05, 2007 7:06 am    Post subject: user defined esql: function in Mapping Node Reply with quote

Apprentice

Joined: 10 Dec 2003
Posts: 42
Location: Atlanta

Hi,

Thanks for the suggestions. Here I am using the Mapping Node to create a new message by extrating a portion of the incoming message. The message has several Tags and I need only a few specific tags as the output message. So I need to identify the tags from an array of Tags. Usually the tags are identified by using the TAG_NAME field.

So, in the Map_script editor I used

[color = red] for $source/GCSS_Event/GDS/TAG_Record
if
condition $source/GCSS_Event/GDS/TAG_Record/TAG_Name = 'TAG0100' [/color]

But some tags' TAG_NAME field is null. So, In this case, I don't know how to identify this Tag in Mapping Node. If it is compute Node I can specify the correct index in an array of all Tags.

like DECLARE TAG_Count INTEGER 0;
DECLARE TAG_Index INTEGER 1;

SET TAG_Count = CARDINALITY(InputRoot.MRM.GDS.TAG_Record[]);

WHILE TAG_Index <= TAG_Count DO

SET TAG_Index = TAG_Index + 1;

END WHILE;

Please give me an idea how to achieve this in the Mapping Node.

Thanks a Lot

Vinod
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Thu Jul 05, 2007 7:15 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes, there's a function to let you get at the current loop counter in a for loop.

I'm too lazy to dig it up in the Info Center, but there's a page in the section on Developing Mappings.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wbi_telecom
PostPosted: Thu Jul 05, 2007 7:46 am    Post subject: Reply with quote

Disciple

Joined: 15 Feb 2006
Posts: 188
Location: Harrisburg, PA

You can call esql functions in mapping node but from my personal experience it it advisable to use the mapping node strictly for straight forward mapping.
If you want to perform complex message manipulation, its better to use ESQL in compute node. For big, complicated message processing the mapping node takes a lot of time and resources.
Cheers,
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 » user defined esql: function in Mapping Node
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.