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 » Dynamic UDP value fetch in ESQL

Post new topic  Reply to topic
 Dynamic UDP value fetch in ESQL « View previous topic :: View next topic » 
Author Message
Pratik611
PostPosted: Mon Sep 11, 2017 3:40 am    Post subject: Dynamic UDP value fetch in ESQL Reply with quote

Novice

Joined: 27 Jul 2014
Posts: 17

Hi,

There's a requirement wherein we got to use the value of a particular UDP from a list of UDP's based on a parameter in the input message.

Is this possible in ESQL?
So i want to dynamically select my UDP and take its value.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Sep 11, 2017 4:07 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

https://www.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ak01015_.htm
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Pratik611
PostPosted: Mon Sep 11, 2017 8:17 pm    Post subject: Reply with quote

Novice

Joined: 27 Jul 2014
Posts: 17

mqjeff wrote:
https://www.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ak01015_.htm


Hey mqjeff, thanks for the reply.
Read through the entire help but couldnt find out if i can pick a UDP out of a list of UDP's dynamically.
I want to do it similar to the below eg:
Environment.Variable.{VariableValueFromInputMessage}

Something like this with a UDP
Back to top
View user's profile Send private message
inMo
PostPosted: Tue Sep 12, 2017 6:23 am    Post subject: Reply with quote

Master

Joined: 27 Jun 2009
Posts: 216
Location: NY

What are you doing to cause recognition of the UDP's value(s) in your ESQL code?
Back to top
View user's profile Send private message
Pratik611
PostPosted: Tue Sep 12, 2017 8:34 pm    Post subject: Reply with quote

Novice

Joined: 27 Jul 2014
Posts: 17

inMo wrote:
What are you doing to cause recognition of the UDP's value(s) in your ESQL code?


So i got this operationID coming in my input message for eg op1 and i have UDP's set like below:
op1=value1,
op2=value2,
op3=value3

so based on the operationID of the incoming message, i need to assign value to a variable FinalValue

so here.. Finalvalue = value1 cos operationid is op1

I hope this makes things clear
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Sep 13, 2017 4:46 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ESQL doesn't have the concept of a hashmap (which it sounds a lot like you're trying to create). Each UDP is a separate and distinct variable with no inherent connection to each other.

It's an easy task to create a CASE statement with the code you outline, and this would work great if you have a fixed number of UDPs that change their value. It's not onerous even if you have a variable number of UDPs as you'd have to change the code to add a new EXTERNAL declaration just to get the UDP to work, so you can add a line to the CASE statement at the same time.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
timber
PostPosted: Thu Sep 14, 2017 4:33 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Alternatively, put all of the properties into a SHARED ROW variable, and access them via the {} syntax:
Code:
SET property1Value = mySharedProperties.{"property1"}
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Sep 14, 2017 5:24 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
ESQL doesn't have the concept of a hashmap (which it sounds a lot like you're trying to create).


With good programming practices, a logical message tree can be accessed as if it were a hashmap.
_________________
chmod -R ugo-wx /
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 » Dynamic UDP value fetch in ESQL
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.