|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
String Concatenation |
« View previous topic :: View next topic » |
Author |
Message
|
kishankumar.v |
Posted: Thu Jan 24, 2002 3:47 am Post subject: |
|
|
Apprentice
Joined: 26 Nov 2001 Posts: 47
|
Hi,
Please look at the following code.
DECLARE DLIMIT CHARACTER;
SET DLIMIT = '++str';
SET OutputRoot.XML.Msg = InputBody.Msg||DLIMIT
is giving a syntax error .. I think it is evaluationg to
SET OutputRoot.XML.Msg = InputBody.Msg||++str
What is the workaround to make this work.
Regards,
Kishan
|
|
Back to top |
|
 |
mapa |
Posted: Thu Jan 24, 2002 6:54 am Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
Hi,
I think that you have looked to much at that code.
Looking at your example you are missing the semi-colon ';' on your concatenation code...
Might be as simple as that, or?
Best regards Magnus Palmér
Quote: |
On 2002-01-24 03:47, kishankumar.v wrote:
Hi,
Please look at the following code.
DECLARE DLIMIT CHARACTER;
SET DLIMIT = '++str';
SET OutputRoot.XML.Msg = InputBody.Msg||DLIMIT
is giving a syntax error .. I think it is evaluationg to
SET OutputRoot.XML.Msg = InputBody.Msg||++str
What is the workaround to make this work.
Regards,
Kishan
|
|
|
Back to top |
|
 |
kishankumar.v |
Posted: Thu Jan 24, 2002 7:35 am Post subject: |
|
|
Apprentice
Joined: 26 Nov 2001 Posts: 47
|
Hi,
Iam sorry it is not that....Actually I meant runtime syntax error.
Sorry for not specifying that explicitly...
BAsically the doubt is how to include single quotes actually inside the expression.
DECLARE K CHARACTER;
SET K = 'kishan';
OutputRoot.XML.fname = InputBody.fname||K;
is evaluating to
OutputRoot.XML.fname = InputBody.fname||kishan;
instead what we need is the expression need to be evaluated to
OutputRoot.XML.fname = InputBody.fname||'kishan';
Regards,
Kishan
|
|
Back to top |
|
 |
cronydude |
Posted: Thu Jan 24, 2002 7:42 am Post subject: |
|
|
 Voyager
Joined: 11 Nov 2001 Posts: 85 Location: US
|
very simple!!! put it with double quots!!! |
|
Back to top |
|
 |
kirani |
Posted: Thu Jan 24, 2002 10:26 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
I think you have to use two single quotes. Try using
DECLARE K CHARACTER;
SET K = ''kishan'';
OutputRoot.XML.fname = InputBody.fname||K;
This should evaluate to
OutputRoot.XML.fname = InputBody.fname||'kishan';
Good luck!
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|