File: README

package info (click to toggle)
gnucobol4 4.0~early~20200606-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 19,888 kB
  • sloc: sh: 119,499; ansic: 98,781; yacc: 16,917; lex: 4,610; cobol: 1,281; perl: 553; makefile: 521; sed: 16
file content (325 lines) | stat: -rw-r--r-- 9,844 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325

		                 GnuCOBOL
		https://www.gnu.org/software/gnucobol/
		https://sourceforge.net/projects/open-cobol
		https://savannah.gnu.org/projects/gnucobol

GnuCOBOL is a free (like both in "free speech" and in "free beer")
COBOL compiler, formerly known as OpenCOBOL.
It implements a substantial part of the COBOL 85, COBOL 2002 and COBOL 2014
standards, as well as many extensions included in other COBOL compilers.

GnuCOBOL translates COBOL into C and compiles the translated code
using the native C compiler on various platforms, including Unix/Linux,
Mac OS X, and Microsoft Windows.

This package contains the following subdirectories:

    cobc        COBOL compiler
    libcob      COBOL run-time library
    bin         COBOL driver program
    build_aux   Helper scripts
    lib         Helper routines for missing OS functionality
    config      Configuration files
    po          International messages
    doc         'info' and 'pdf' files
    tests       Test suite (GnuCOBOL and framework for COBOL85)
    extras      useful COBOL programs

All programs except those in lib and libcob are distributed under
the GNU General Public License.  See COPYING for details.

Programs in lib and libcob are distributed under the GNU Lesser
General Public License.  See COPYING.LESSER for details.

For any copyright year range specified as YYYY-ZZZZ in this package,
that the range specifies every single year in that closed interval.

Although many have participated, most development thanks go to

    Roger While
    Keisuke Nishida

See AUTHORS for the author of each file.

============
Requirements
============

  ***
    NOTE
    For all the following packages (required or optional),
    BOTH runtime AND development components are necessary.
  ***
  ***
    NOTE
    All the following packages are normally part of a Linux
    distribution. Cygwin distribution also has these as installable
    packages, other operating systems also may have repositories for
    these - eg. MAC OS, CentOS and others all have package repositories.
    ALWAYS install the distribution packages when available !!
  ***

GnuCOBOL REQUIRES one of the following external libraries to be installed
for implementation of decimal arithmetic:

    BOTH runtime AND development components required.

  o GNU MP (libgmp) 4.1.2 or later
    https://gmplib.org

  OR

  o MPIR (libgmp - MPIR gmp-compat) 1.3.1 or later
    (preferred when compiling on Windows with other compilers than GCC)
    http://mpir.org

    GNU MP and MPIR are distributed under GNU Lesser General Public License.

    NOTE
    Please ALWAYS use the distro package whenever possible !!
    See NOTE above.


GnuCOBOL MAY require the following external libraries to be installed:

    ***
    NOTE - libltdl is NOT needed when installing on Linux,
    SUN Solaris, MAC OS, CentOS or Windows
        (including Cygwin, MingW and native windows).
    It is also NOT needed with later versions of AIX and HP-UX.
    (AIX >= 5.1 and HP-UX >= 11.1 are known to NOT require this).
    (Check if you have the "dlopen" function).
    ***

  o GNU Libtool (libltdl)
    https://www.gnu.org/software/libtool/libtool.html

    libltdl is used to implement dynamic CALL statements.

    GNU Libtool is distributed under GNU Lesser General Public License.


The following libraries ARE required WHEN :

1) Indexed-Sequential file I/O (ISAM) is used

    BOTH runtime AND development components required.

    One of the following:

  o Berkeley DB (libdb) 4.1 or later
    https://www.oracle.com/
    https://www.oracle.com/technology/products/berkeley-db/db/index.html

    Berkeley DB is distributed under Oracles own open-source license.
    Note that if you linked your software with Berkeley DB,
    you must distribute the source code of your software along with your
    software, or you have to pay royalty to Oracle.

  o VBISAM - ISAM file handler (libvbisam) 2.0 or later
    https://sourceforge.net/projects/vbisam/

    VBISAM is distributed under GNU Lesser General Public License.

  o DISAM File handler (libdisam)
    http://www.isamcentral.com

    DISAM is distributed under the proprietary License
    "Byte Designs Ltd. DISAM Software License".

2) SCREEN SECTION and/or extended ACCEPT/DISPLAY is used

    BOTH runtime AND development components required.

    One of the following:

  o Ncurses (ncurses or ncursesw) 5.2 or later
    https://www.gnu.org/software/ncurses/ncurses.html

    Ncurses is distributed under a BSD style license.

  o PDCurses (pdcurses) for MinGW/native windows ports
    https://pdcurses.org/ or https://github.com/Bill-Gray/PDCurses/

    PDCurses is distributed as Public Domain.

  o Unix curses

3) XML runtime support is used

    BOTH runtime AND development components required.

    libxml2 - http://xmlsoft.org

    libxml2 is distributed under MIT License.

4) JSON runtime support is used

    BOTH runtime AND development components required.
    As an alternative of an installed version you may place
    cJSON.c and cJSON.h under "libcob" to include the used functions
    directly in the COBOL runtime.

    cJSON >= 1.3.0 - https://github.com/DaveGamble/cJSON

    cJSON is distributed under MIT License.

============

============
Installation
============

See the INSTALL file for detailed information about how to configure
and install GnuCOBOL.
Special requirements and further installation notes are listed below.

** NOTE **
   The default installation path for GnuCOBOL is /usr/local.
   The installation path may be changed by specifying --prefix=<dir>
   as a parameter to the configure.
   Further parameters may be specified to affect
   include/library search paths.
   Execute ./configure --help for further details.

To generate/install GnuCOBOL :

**************************************

 Configure and build
    ./configure
    make

 Here you may run different tests with the version of GnuCOBOL that is
 not installed yet, see "Tests" below.
 This is *highly recommended* before installing.

 Install
    make install

** NOTE **
   You generally need super-user privileges to execute "make install"
   unless you changed the installation directory with
   "./configure --prefix=<dir>" or install to a different location with
   "make install DESTDIR=<dir>".
   In those later cases you only need to have full access to <dir>.

** NOTE **
   On Linux systems, if you are installing for the
   -first- time, you may need to run "ldconfig" (as root).
   In fact, it does not hurt if you always do this.

** NOTE **
   On some Red Hat (Fedora) installations and
   possibly other Linux distros, /usr/local/lib
   is NOT automatically searched at runtime.
   Edit /etc/ld.so.conf (or the equivalent file) and add
   /usr/local/lib to the file.
   Rerun "ldconfig".

**************************************

If you think you have a problem or just want to log
the output of make then redirect the output with :
    make 1>mymake.log 2>&1
    make install 1>myinstall.log 2>&1

**************************************

You can get back to a clean installation status by running :
    make distclean

**************************************


============
Tests
============


 To run the internal testsuite, simply do
    make check
 This MUST succeed - If not, please report.

 You may optionally perform a series of COBOL85 tests.
    make test
 It is recommended that you also perform these tests.

** NOTE **
   The language interpreter "perl" is required to run COBOL85 tests.

** NOTE **
   Running "make test" will try to download the COBOL85
   testsuite if it is missing.
   For details see tests/cobol85/README.

 If you want to run both testsuites you can run
    make checkall


============

The following is only interesting for advanced use.
A normal user should not have recourse to use these
options.

There are many configure options (see configure --help for a full list),
these are the most important ones:

   --with-db             Use Berkeley DB >= 4.1 (libdb) (ISAM handler)
                         This is the default

   --without-db          Do neither use Berkeley DB nor any other ISAM handler
                         You will not be able to use indexed I/O

   --with-vbisam         Use VBISAM (libvbisam) (ISAM handler)

   --with-dl             Use the system dynamic linker
                         This is the default

   --without-dl          Use ltdl for dynamic program loading

   --with-patch-level=<n>  Set internal patch level to n (default 0)

   --with-varseq=<n>     Define the default format for variable
                         length sequential files.

         The default may be overridden at run time by
         setting the environment variable
         COB_VARSEQ_FORMAT to 0, 1, 2, or 3.

         For values of 0, 1 and 2, four bytes are
         written preceding each record. The format of
         these four bytes for values of 0, 1, 2 is
         as follows :
         n = 0 (default)
           The first 2 bytes are the record length
           in big-endian order. This is compatible
           with mainframe. Bytes 3 and 4 are set
           to binary 0.
         n = 1
           The 4 bytes are the record length in
           big-endian order.
         n = 2
           The 4 bytes are the record length in
           native machine order (int).
           (This was previously the default)

         For the value of 3, two bytes are written
         preceding each record :
         n = 3
           The first 2 bytes are the record length
           in big-endian order. The record follows
           immediately after beginning at byte 3.

   --enable-debug        Add '-g' debug option to make

============

============
Development
============

If you wish to hack the GnuCOBOL source or build from version control,
see HACKING.