Posted: Wed Jan 15, 2003 6:40 am Post subject: CAST problem
Acolyte
Joined: 04 Jan 2002 Posts: 65 Location: usa
Hi,
Recently I installed MQ CSD05 and WMQI CSD03.
I could see CAST problems here.Can anyone suggest for fix.
Code as follows:
-----BEGIN--------
DECLARE C INTEGER;
SET C = CARDINALITY(InputRoot.*[]);
DECLARE I INTEGER;
SET I = 1;
WHILE I < C DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.Properties.MessageFormat = 'CWF';
SET OutputRoot.Properties.MessageSet = 'DPOV7QO084001';
SET OutputRoot.Properties.MessageType = 'LONGSTRINGMSG';
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
DECLARE X INTEGER;
DECLARE Y INTEGER;
DECLARE query CHAR;
DECLARE yStr CHAR;
SET query = '';
SET X = 2;
SET Y = MultiplyByTwo(X);
CREATE FUNCTION MultiplyByTwo(Value INTEGER) RETURNS INTEGER
RETURN Value * 3;
SET yStr = CAST(Y AS CHAR);
SET query = query || yStr;
SET OutputRoot.MRM.Buffer_Message = TRIM(query);
-------END-----
Error show as:
BIP2402E: (26, 1) : Syntax error : 'integer SET'.
The token caused a syntax error.
Correct the syntax of your expression and redeploy the message flow.
you have to locate functions and procedures in the end of the esql code. In your example you have a function declared in the middle of the main program - which causes the error.
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