Posted: Mon Aug 25, 2025 3:23 am Post subject: Question on variable substitution
Centurion
Joined: 19 Apr 2010 Posts: 139
Is there a reason that this works:
Quote:
IF InputRoot.MQMD.SourceQueue = 'XYZ' THEN
SET Qualifier = 'XMLNSC';
ELSE SET Qualifier = 'JSON.Data';
END IF;
SET OutputRoot.{Qualifier}.Base.XYZ ='1';
but this doesn't
Quote:
IF InputRoot.MQMD.SourceQueue = 'XYZ' THEN
SET Qualifier = 'Environment.Input';
ELSE SET Qualifier = 'InputRoot.JSON.Data';
END IF;
IF {Qualifier}.Base.XYZ ='1' THEN
SET A = 'A';
END IF;
I want to set the 'top level' of a reference to either
Joined: 05 Jan 2008 Posts: 9481 Location: US: west coast, almost. Otherwise, enroute.
What precisely doesn?t work? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
The failure case gives me an error when I save the ESQL file.
The Problem description in the Toolkit for the line
Code:
IF {Qualifier}.Base.XYZ ='1' THEN
is as follows:
Quote:
Syntax error. Valid options include: = - ( + .NET CASE CAST COUNT CURRENT_DATE CURRENT_GMTDATE CURRENT_GMTTIME CURRENT_GMTTIMESTAMP CURRENT_TIME CURRENT_TIMESTAMP DATE DECIMAL EVAL EXISTS EXTRACT FALSE FOR GMTTIME GMTTIMESTAMP IDENTIFIER INTERVAL LIST LOCAL_TIMEZONE LOG MAX MIN NOT NULL OVERLAY PARSE PASSTHRU POSITION RAND ROUND ROW SELECT SIMPLE_FUNCTION SUBSTRING SUM THE TIME TIMESTAMP TRIM TRUE UNKNOWN URLENCODE UUIDASBLOB UUIDASCHAR
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