|
From: | Ron Norman |
Subject: | Re: [open-cobol-list] Newline on files produced by OpenCOBOL programs |
Date: | Fri, 20 Dec 2013 08:28:45 -0500 |
Hello Vincent
You wrote:
<< Please, please avoid changing the code that effects Line Sequential files that have LF/CR equivalents installed for Linux or Osx systems as all this does is create a blank line between each printed line and is very non standard.
Of course LF/CR is correct for Windows systems. >>.
I have been checking this and it appears:
1. OpenCOBOL fileio LINE SEQUENTIAL appends '\n' to each line written. It uses the standard fileio special characters - '\f' to throw the page, '\n' to advance a line, etc. Their is no alternative provision for WIN32, etc in the code. I know this results in 0x0a (LF) when running on LINUX. I expect that when run on Windows, 0x0d0a (CR + LF) - but I haven't checked this yet. The only reference to '\r' I can find is to skip or ignore it when reading LINE SEQUENTIAL.
2. I have just re-run the SQ section of the COBOL85 ANSI test suite for OpenCOBOL and Micro Focus, both on LINUX platforms. On Micro Focus every line in ALL logs has a CR. So for example when viewing with "vi" any log file, you see ^M displayed at the end of each line. I don't know whether this is configurable in Micro Focus.
3. Most print drivers, utilities etc will handle either convention: CR + LF and LF. So I am not sure why this becomes an "issue".
I think I remember you saying you had patched OpenCOBOL to fix this problem. Any code fragments illustrating what you fixed would help me double check fileio is now OK.
Regards: Joe Robbins
Joe Robbins
address@hidden
www.bawtry.net
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list
[Prev in Thread] | Current Thread | [Next in Thread] |