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 » Using CHAR with REFERENCE TO

Post new topic  Reply to topic
 Using CHAR with REFERENCE TO « View previous topic :: View next topic » 
Author Message
oli
PostPosted: Thu Oct 11, 2012 1:59 am    Post subject: Using CHAR with REFERENCE TO Reply with quote

Acolyte

Joined: 14 Jul 2006
Posts: 68
Location: Germany

Hi all,

I currently have the same problem as described in http://www.mqseries.net/phpBB/viewtopic.php?p=304027

I have a CHAR variable myVar that is to be used as a field reference, e.g. "InputLocalEnvironment.Variables.config".

I now want to use the variable myVar to achieve the same as with
Code:
DECLARE myRef REFERENCE TO InputLocalEnvironment.Variables.config;


Unfortunately the method described in the above mentioned topic to use EVAL doesn't work in the way described. When I use
Code:
DECLARE myRef REFERENCE TO EVAL(myVar);

the ESQL editor shows an error
Code:
Syntax error. Valid options include: ;


What is wrong here? Do I miss anything?

Thanks Oli
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Oct 11, 2012 2:53 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The argument that follows 'REFERENCE TO' is an ESQL 'field reference'. The syntax is described in the info center here: http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etools.mft.doc/ak04861_.htm

After reading it, you will see that EVAL is not necessary here : what you need is the {} syntax in the path. You must begin the path with a correlation name such as 'InputBody.' before using the {myVar} syntax.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Oct 11, 2012 3:07 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

the eval was apparently my earlier suggestion.

I'm going to have to disagree with myself, and suggest you follow kimbert's method instead.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Oct 11, 2012 3:33 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

And remember the {} syntax is only valid for 1 level... so you may have
InputBody.{}.{}.{}...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Thu Oct 11, 2012 3:35 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

fjb_saper wrote:
And remember the {} syntax is only valid for 1 level... so you may have
InputBody.{}.{}.{}...


Anyways why not use MOVE ref TO ref.FirstChild, nextSibling etc... and check the FieldName(ref) and FieldNamespace(ref) ?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Using CHAR with REFERENCE TO
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.