gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Newline on files produced by OpenCOBOL programs


From: Ron Norman
Subject: Re: [open-cobol-list] Newline on files produced by OpenCOBOL programs
Date: Fri, 20 Dec 2013 08:28:45 -0500

I think what Micro Focus does and what I think GNUCobol should do is this:
For LINE SEQUENTIAL on Unix/Linux end the lines with LF
For LINE SEQUENTIAL on Windows end the lines with CR LF
For LINE ADVANCING on Unix/Linux/windows end the lines with CR LF

LINE ADVANCING is clearly a print file but LINE SEQUENTIAL may simply just be a sequential file that you may want to view with an editor.

ORGANIZATION SEQUENTIAL ACCESS RECORD SEQUENTIAL files are fixed size records with no character between records.




On Fri, Dec 20, 2013 at 7:57 AM, Joe Robbins <address@hidden> wrote:

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

 


------------------------------------------------------------------------------
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




--
Cheers
Ron Norman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]