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 » To add special charcters and keywords as tag value in ESQL

Post new topic  Reply to topic
 To add special charcters and keywords as tag value in ESQL « View previous topic :: View next topic » 
Author Message
zuresh2zuresh
PostPosted: Wed Mar 18, 2009 11:51 pm    Post subject: To add special charcters and keywords as tag value in ESQL Reply with quote

Newbie

Joined: 18 Mar 2009
Posts: 2

My desired output for a tag in the outbound XML.
<TagA>'Reporting Contact First Name, Contact Surname or Contact Phone Number'</TagA>

By trial and error method and based on logical assumptions, I achieved the output with the below mentioned code. Can any one of you give a technical explanation on how it works?

Declare a CHARACTER '''Reporting Contact First Name, Contact Surname or Contact Phone Number''';
Then followed by usual SET statement.

Cheers,
Suresh S
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Thu Mar 19, 2009 12:34 am    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

zuresh2zuresh wrote:
My desired output for a tag in the outbound XML.
<TagA>'Reporting Contact First Name, Contact Surname or Contact Phone Number'</TagA>

By trial and error method and based on logical assumptions, I achieved the output with the below mentioned code. Can any one of you give a technical explanation on how it works?
Declare a CHARACTER '''Reporting Contact First Name, Contact Surname or Contact Phone Number''';
Then followed by usual SET statement.


What strange thing you have noticed here ... you have to use an additional ' if you want a single quote in your character literal..

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ak17830_.htm
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Thu Mar 19, 2009 1:11 am    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

And please get this moved to correct section...
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
zuresh2zuresh
PostPosted: Thu Mar 19, 2009 2:09 am    Post subject: Reply with quote

Newbie

Joined: 18 Mar 2009
Posts: 2

But I've used three codes (').... I am not able to get the output with two codes

Cheers,
Suresh S
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Mar 19, 2009 2:20 am    Post subject: Reply with quote

Grand High Poobah

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

Moved to correct section
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Mar 19, 2009 2:55 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Three ' is correct.

A CHARACTER literal is delimited by ' so the outer pair are for the literal string.

Then to use a literal ' inside a string literal it needs to be escaped by another ', so you end up with three ' in your case. If the literal ' was somewhere inside the string (not at the ends) then it would look easier to read for example :

Code:
DECLARE x CHAR 'can''t you feel the music?';


This is documented in topic: ak17830


Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
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 » To add special charcters and keywords as tag value 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.