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 » ESQL & dynamic field names

Post new topic  Reply to topic
 ESQL & dynamic field names « View previous topic :: View next topic » 
Author Message
Ajju.
PostPosted: Tue Nov 19, 2002 5:52 am    Post subject: ESQL & dynamic field names Reply with quote

Voyager

Joined: 26 Jul 2002
Posts: 77

Hi All,
IS there a Way for converting ouput in TDS format taking input values:
i.e if the input is.

<TAG1>VALUE1</TAG1>
<TAG2>VALUE2</TAG2>
<TAG3>VALUE3</TAG3>
<TAG4>VALUE4</TAG4>


ouput shud be:

actual value of TAG1:value of TAG2||value of TAG3:value of TAG4||

I.e
VALUE1:VALUE2||VALUE3:VALUE4||

Thanks in adv,
Ajju.
Back to top
View user's profile Send private message
Yanghui
PostPosted: Tue Nov 19, 2002 7:54 am    Post subject: Reply with quote

Disciple

Joined: 08 May 2002
Posts: 151
Location: Dublin, Ireland

Hi, Ajju,

You can use TDS in MRM to define a msg type with two string elements, E1 and E2. The msg type should be specified "All Element Delimited" for Data Element Seperation and "||" for Delimiter.

In your Compute node, you just need to do something similar as below,

SET OutputRoot.Properties.MessageSet = 'DOGO76O08E001';
SET OutputRoot.Properties.MessageType = 'M1';
SET OutputRoot.Properties.MessageFormat = 'TDS';

DECLARE E1 AS CHAR;
DECLARE E2 AS CHAR;

SET E1 = RefIn.TAG1 || ':' || RefIn.TAG2;
SET E2 = RefIn.TAG3 || ':' || RefIn.TAG4;

SET "OutputRoot"."MRM"."E1" = E1;
SET "OutputRoot"."MRM"."E2" = E2;

Don't forget to include the msgset in your compute node.

Hope it helps.

-Yanghui
Back to top
View user's profile Send private message Send e-mail
Ajju.
PostPosted: Tue Nov 19, 2002 8:55 am    Post subject: Reply with quote

Voyager

Joined: 26 Jul 2002
Posts: 77

thanks Yanghui,

I tried it and the output is something like :

E1:VALUE1:VALUE2||E2:VALUE3:VALUE4||

what i am expecting at the output is
VALUE1:VALUE2||VALUE3:VALUE4||


help is appreciated.
Thanks,
Ajju.
Back to top
View user's profile Send private message
seeknee
PostPosted: Wed Nov 20, 2002 3:21 am    Post subject: Reply with quote

Apprentice

Joined: 08 Aug 2002
Posts: 41
Location: Melbourne, Australia

Hi

You could try using NEON.

I know its not the best way of doing it but it works

Hopefully this helps
Back to top
View user's profile Send private message
lung
PostPosted: Wed Nov 20, 2002 4:42 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

Ajju,

Instead of
Code:
SET "OutputRoot"."MRM"."E1" = E1;
SET "OutputRoot"."MRM"."E2" = E2;

Try
Code:
SET "OutputRoot"."MRM" = E1;
SET "OutputRoot"."MRM" = E2;


_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Ajju.
PostPosted: Thu Nov 21, 2002 8:18 am    Post subject: Reply with quote

Voyager

Joined: 26 Jul 2002
Posts: 77

Thanks lung for your reply.

well this

SET "OutputRoot"."MRM" = E1;
SET "OutputRoot"."MRM" = E2;

will give me VALUE1:VALUE2||VALUE3:VALUE4||

and it will work only i have limited elements that is when i know E1, E2..... but what if i have a loop and the output is something like.

while c< = 10 do

SET "OutputRoot"."MRM".E[c] = E[c];

SET c = c+1;

end while;

i cannot do something like :
SET "OutputRoot".MRM[c] = E[c];

instead of
SET "OutputRoot"."MRM".E[c] = E[c];


In short the bottomline is can i set output elements names dyanamically using a counter or a loop.

advice is appreciated

thanks in adv.
Ajju.
Back to top
View user's profile Send private message
lung
PostPosted: Thu Nov 21, 2002 10:14 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

I think there is a way to output element names dynamically... Take a look at the CREATE FIELD chapter in the ESQL Reference .pdf file.

I haven't really use this function before, so I don't think I will be of much help in this case
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL & dynamic field names
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.