gnucobol-users
[Top][All Lists]
Advanced

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

[open-cobol-list] GNU COBOL sets execute bit on file creation


From: Harald Arnesen
Subject: [open-cobol-list] GNU COBOL sets execute bit on file creation
Date: Thu, 12 Feb 2015 18:26:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0

GNU COBOL 2.0 (and 2.1/reportwriter) is different from GNU COBOL 1.1,
and in my opinion the old behaviour is correct.

Consider the following program:


identification division.
program-id. modemask.

environment division.
input-output section.
file-control.
     select modemask-file assign to "modemask.out".

data division.
file section.
fd modemask-file.
01 modemask-out pic x(80).

procedure division.
main section.
10.  open output modemask-file.
     move "Hello World" to modemask-out.
     write modemask-out.
     close modemask-file.
     stop run.


$ cobc --version
cobc (GNU Cobol) 2.0.0
Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Keisuke Nishida
Copyright (C) 2006-2012 Roger While
Copyright (C) 2009,2010,2012,2014 Simon Sobisch
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Built     Feb 11 2015 11:36:40
Packaged  Jan 20 2014 07:40:53 UTC
C version "4.9.1"
$
$ cobc -x -free modemask.cob
$ ./modemask
$ ls -l modemask.out
-rwxr-xr-x 1 harald harald 80 Feb 12 18:21 modemask.out
$

$ rm modemask.out

$ cobc --version
cobc (GNU Cobol) 1.1.0
Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Keisuke Nishida
Copyright (C) 2006-2012 Roger While
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Built     Feb 11 2015 11:35:47
Packaged  Jan 20 2014 07:40:53 UTC
C version "4.9.1"
$
$ cobc -x -free modemask.cob
$ ./modemask
$ ls -l modemask.out
-rw-r--r-- 1 harald harald 80 Feb 12 18:23 modemask.out
$


reply via email to

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