|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Incomplete last line |
« View previous topic :: View next topic » |
Author |
Message
|
KIT_INC |
Posted: Fri Apr 09, 2010 10:08 am Post subject: Incomplete last line |
|
|
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 |
|
 |
smdavies99 |
Posted: Fri Apr 09, 2010 11:20 am Post subject: |
|
|
 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 |
|
 |
rekarm01 |
Posted: Fri Apr 09, 2010 2:09 pm Post subject: Re: Incomplete last line |
|
|
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 |
|
 |
KIT_INC |
Posted: Sun Apr 11, 2010 11:18 pm Post subject: |
|
|
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 |
|
 |
smdavies99 |
Posted: Sun Apr 11, 2010 11:22 pm Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
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
|
|
|
|