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 » Adding new line character in a string?.

Post new topic  Reply to topic
 Adding new line character in a string?. « View previous topic :: View next topic » 
Author Message
wmb61_user
PostPosted: Thu Jul 24, 2008 11:19 am    Post subject: Adding new line character in a string?. Reply with quote

Novice

Joined: 08 May 2008
Posts: 18

I would like to send the source queue name and the a control number that was in error(this is part of the input message) in the body of an e-mail. I was able to figure how to do this but cannot break down into two lines. How do I do it in ESQL.

For example the output messagelook like this.

TEST.FROMOE.TOMSGBRK.ORDER.CANCEL 5009231

I would like to split them into two lines in the message bod.y(i.e add a carraige return).

TEST.FROMOE.TOMSGBRK.ORDER.CANCEL
5009231


Here is my current code:
SET OutputRoot.XMLNSC.Email.Body = InputRoot.MQMD.SourceQueue || ' ' ||
CAST(InputRoot.MRM.TG2_OPS_CONTRL_NUM AS CHARACTER);
Thanks.
Back to top
View user's profile Send private message
sridhsri
PostPosted: Thu Jul 24, 2008 11:39 am    Post subject: Reply with quote

Master

Joined: 19 Jun 2008
Posts: 297

I think an XML element will ignore whitespaces (like spaces and \n). You might want to create two elements under body

SET OutputRoot.XMLNSC.Email.Body.QueueName = '';
SET OutputRoot.XMLNSC.Email.Body.ControlNumber = '';

You would output this as HTML (for which you might want to use HTML tags and then use a <BR> tag as a line separator)
Back to top
View user's profile Send private message
wmb61_user
PostPosted: Thu Jul 24, 2008 12:57 pm    Post subject: Reply with quote

Novice

Joined: 08 May 2008
Posts: 18

sridhsri,

I cannot create any elements underneath Body as I am using an XSD that should conform to what our SendEmail message flow uses. What ever text needs to go out should be in the Body.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jul 24, 2008 1:55 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

An XML element is can contain any string which is composed of valid XML characters. A linefeed character is a valid XML character. If you put two linefeeds together, an XML processor is supposed to 'normallze' them to a single linefeed.

So you should be able to append a single linefeed to your element value.
I searched for 'ESQL carriage return' in this forum, and found this: http://www.mqseries.net/phpBB2/viewtopic.php?p=55349&highlight=#55349
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 » Adding new line character in a string?.
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.