This does not compile when used with GNU Cobol 2.2 or 3.0, due to a collision with the C reserved word template.
Observed behavior
With cobc (GnuCOBOL) 2.2.0:
[vagrant@localhost cobol-on-wheelchair]$ cobc --version
cobc (GnuCOBOL) 2.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart
Built May 31 2020 15:29:27
Packaged Sep 06 2017 18:48:43 UTC
C version "4.8.5 20150623 (Red Hat 4.8.5-39)"
[vagrant@localhost cobol-on-wheelchair]$ ./downhill.sh
cow.cbl: 385: error: invalid PROGRAM-ID 'template' - name duplicates a 'C' keyword
controllers/showsum.cbl: 50: warning: line not terminated by a newline
[vagrant@localhost cobol-on-wheelchair]$ echo $?
1
And with cobc (GnuCOBOL) 3.0-rc1.0:
[vagrant@localhost cobol-on-wheelchair]$ cobc --version
cobc (GnuCOBOL) 3.0-rc1.0
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart
Built May 31 2020 02:08:46
Packaged Apr 22 2018 22:26:37 UTC
C version "4.8.5 20150623 (Red Hat 4.8.5-39)"
[vagrant@localhost cobol-on-wheelchair]$ ./downhill.sh
cow.cbl:385: error: invalid PROGRAM-ID 'template' - name duplicates a 'C' keyword
controllers/showsum.cbl:50: warning: line not terminated by a newline
[vagrant@localhost cobol-on-wheelchair]$ echo $?
1
Expected behavior
This should work as it does with gnucobol 1.1.0:
[vagrant@localhost cobol-on-wheelchair]$ 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 May 31 2020 15:32:42
Packaged Jan 20 2014 07:40:53 UTC
C version "4.8.5 20150623 (Red Hat 4.8.5-39)"
[vagrant@localhost cobol-on-wheelchair]$ ./downhill.sh
[vagrant@localhost cobol-on-wheelchair]$ ./the.cow
content-type: text/html
<html>
<head>
<title>
Hello CoW.
</title>
</head>
<body>
<img src='images/logo.png' hspace=30 align=left>
<h2>Cobol on Wheelchair says hello!</h2>
<P>
<b>Examples</b>
<ul>
<li><a href="showname/Adrian">Hello World</a>
<li><a href="showsum/22/11">Calculator (values from path)</a>
</ul>
</body>
</html>
libcob: Cannot find module ''
[vagrant@localhost cobol-on-wheelchair]$ cat /etc/centos-release
CentOS Linux release 7.8.2003 (Core)
This does not compile when used with GNU Cobol 2.2 or 3.0, due to a collision with the C reserved word
template
.Observed behavior
With
cobc (GnuCOBOL) 2.2.0
:And with
cobc (GnuCOBOL) 3.0-rc1.0
:Expected behavior
This should work as it does with gnucobol 1.1.0: