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 » Problem with Adding a new Line in Text

Post new topic  Reply to topic
 Problem with Adding a new Line in Text « View previous topic :: View next topic » 
Author Message
Svp
PostPosted: Fri Mar 12, 2010 1:15 pm    Post subject: Problem with Adding a new Line in Text Reply with quote

Apprentice

Joined: 18 Feb 2010
Posts: 40

I have a Message FLow which receives a XML message and store the
content of that message in a text file. I want to store each data in the XML
in a new line.
I referred the forum which discussed about adding new line to a e-mail output.
My ESQL looks like given below

DECLARE CR CHAR CAST(CAST('X''0A''' AS BLOB) AS CHAR );

SET L1 = 'Data1:'||Inputroot.XMLNSC.---.--||CR;
SET L2 = 'Data2:'||Inputroot.XMLNSC.---.--||CR;
SET FINAL = L1||L2;

I am not getting a newline in my output instead
I am getting all the message in a single line

-----Data1:(Msg)X'0a'Data1:(Msg)X'0a'

Is there any other way to add a new line or I have done anything wrong in my code?
Back to top
View user's profile Send private message
Luke
PostPosted: Sat Mar 13, 2010 12:06 am    Post subject: Re: Problem with Adding a new Line in Text Reply with quote

Centurion

Joined: 10 Nov 2008
Posts: 128
Location: UK

Svp wrote:

DECLARE CR CHAR CAST(CAST('X''0A''' AS BLOB) AS CHAR );
...
I have done anything wrong in my code?


Your DECLARE is the problem - you shouldn't need to CAST twice, also when you CAST X'0A' to CHAR, I think you'll need to specify the CCSID.

Hope that helps ...

Luke
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Mar 13, 2010 6:05 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

I truly don't understand your requirement.
If you want to see each part on it's own line use a browser or XML viewer to look at the XML.
XML is not designed to be human readable but is machine readable / parsable. So this should be no news to you... On top of this if you are preparing the output for an email program it should probably have x0d0a (CRLF) in it... unless your mailer transforms the LF into CRLF...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Sat Mar 13, 2010 12:06 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I am not getting a newline in my output instead
I am getting all the message in a single line
Are you quite sure about that? Many Windows-based text editors will not recognise a single LF ( 0x0A ) as a linefeed. That would make the entire file appear as a single line.
If my guess is correct, please note that there are plenty of free text editors that handle linefeeds intelligently.
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 » Problem with Adding a new Line in Text
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.