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 » Incomplete last line

Post new topic  Reply to topic
 Incomplete last line « View previous topic :: View next topic » 
Author Message
KIT_INC
PostPosted: Fri Apr 09, 2010 10:08 am    Post subject: Incomplete last line Reply with quote

Knight

Joined: 25 Aug 2006
Posts: 589

I am devloping a flow to output a XML file to unix. The output is well formed XML (a single file containing one big xml) . I have no message set for it.
But I am getting "Incomplete last line" when trying to view the file with vi.
I thing that it is because /LF is missing.
I was wondering what's the best way to add the /lf to the end of the file.
One way is probably reset the xml to BLOB, append the lf and reset it back to XML. This seems a long way ? Any better way to do this?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Apr 09, 2010 11:20 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Have you tried viewing the file in a web browser.?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Fri Apr 09, 2010 2:09 pm    Post subject: Re: Incomplete last line Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

KIT_INC wrote:
But I am getting "Incomplete last line" when trying to view the file with vi.
I thing that it is because /LF is missing.

That's just a harmless warning, peculiar to vi.

vi (like many other Unix commands) expects text files to consist of lines of text; each line ends with an EOL (usually LF character), including the last line. vi will issue a warning if the last line doesn't have an EOL; upon write, if the last line does not end with an EOL, vi will automatically append one, (like it or not).

KIT_INC wrote:
I was wondering what's the best way to add the /lf to the end of the file. One way is probably reset the xml to BLOB, append the lf and reset it back to XML. This seems a long way? Any better way to do this?

Why? That seems like a long way to go, just to suppress a warning in vi. Unless there's a business reason to add white space to the XML, it's probably not worth the bother.

vi does have a limit on the maximum length of the line though, which may present a more serious problem. If the XML file is too big, (and all on one line), then vi will complain about "line too long", and stop reading the file at that point. In that case, the XMLNSC parser has an option to preserve white space (including EOL) on output; that may work well enough.

It might be easier to just use something other than vi, like "more", browser, or XML editor.
Back to top
View user's profile Send private message
KIT_INC
PostPosted: Sun Apr 11, 2010 11:18 pm    Post subject: Reply with quote

Knight

Joined: 25 Aug 2006
Posts: 589

I am checking with the receiving application to see if they require a /lf at the end. Our application support people has the habbit of brosing output files. This is just a nuisance to them.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sun Apr 11, 2010 11:22 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

KIT_INC wrote:
This is just a nuisance to them.


There are other text editors on Unix/Linux. Get them to try Emacs or 'edlin' Then they'll stop complaining.


_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
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 » Incomplete last line
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.