Skip to content

Commit 0e8deba

Browse files
committed
Remove all numbers on sections
As a result, most numbers are not changed, but appendices have different numbers, especially C1..C4
1 parent 4bd5ba0 commit 0e8deba

26 files changed

+1692
-1679
lines changed

guide/1.texi

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@comment *********************************************************************
22
@comment ** 1. Introduction **
33
@comment *********************************************************************
4-
@newchapter{1,Introduction}
4+
@newchapter{Introduction}
55
This document describes the syntax, semantics and use of the COBOL programming language as implemented by GnuCOBOL, formerly known as OpenCOBOL.
66

77
The original principal developers of GnuCOBOL were Keisuke Nishida and Roger While. Since then, many members of the community have been involved in its development.
@@ -17,18 +17,14 @@ Other documents that should be read is the @file{gnucobol.pdf} found in the @fil
1717
Yet another document which delves deeper in to the compiler that is a @i{must} read, is the FAQ available via the GnuCOBOL
1818
@url{https://gnucobol.sourceforge.io/#faq, Manuals and Guides}, although it could do with a wee clean up to ease reading and finding required information.
1919
@menu
20-
* 1.1: Additional Reference Sources.
21-
* 1.2: Introducing COBOL.
22-
@detailmenu
23-
* 1.2.1: Why YOU Should Learn COBOL.
24-
* 1.2.2: Programmer Productivity.
25-
@end detailmenu
26-
* 1.3: So What is GnuCOBOL?.
20+
* Additional Reference Sources.
21+
* Introducing COBOL.
22+
* So What is GnuCOBOL?.
2723
@end menu
2824
@comment *********************************************************************
2925
@comment ** 1.1 Additional Reference Sources **
3026
@comment *********************************************************************
31-
@newsection{1.1,Additional Reference Sources}
27+
@newsection{Additional Reference Sources}
3228
For those wishing to learn COBOL for the first time, Gary can strongly recommend the following resources.
3329

3430
If you like to hold a book in your hands, I strongly recommend @i{Murach's Structured COBOL}, by Mike Murach, Anne Prince and Raul Menendez (2000) - ISBN 9781890774059. Mike Murach and his various writing partners have been writing outstanding COBOL textbooks for decades. It's an excellent book for those familiar with the concepts of programming in other languages, but unfamiliar with COBOL.
@@ -46,20 +42,20 @@ Along with every release of the compiler sources is the file @file{NEWS}. It co
4642
@comment *********************************************************************
4743
@comment ** 1.2 Introducing COBOL **
4844
@comment *********************************************************************
49-
@newsection{1.2,Introducing COBOL}
45+
@newsection{Introducing COBOL}
5046
If you already know a programming language other than COBOL, chances are that language is Java, C or C++. You will find COBOL much different from those; sometimes the differences are a good thing and sometimes they aren't. The thing to remember about COBOL is this: @i{it was designed to solve business problems}.
5147

5248
COBOL, first introduced to the programming public in 1959, was the very first programming language to become standardized (in 1960). This meant that a standard-compliant COBOL program written on computer ``A'' made by company ``B'' would be able to be compiled and executed on computer ``X'' made by company ``Y'' with very few, if any, changes. This may not seem like such a big deal today, but it was a radical departure from all programming languages that came before it and even many that came after it.
5349

5450
The name @acronym{COBOL} actually says it all --- COBOL is an acronym that stands for ``(@b{CO})mmon (@b{B})usiness (@b{O})riented (@b{L})anguage''. Note the fact that the word ``common'' comes before all others. The word ``business'' is a close second. Therein lies the key to COBOL's success.
5551
@menu
56-
* 1.2.1: Why YOU Should Learn COBOL.
57-
* 1.2.2: Programmer Productivity.
52+
* Why YOU Should Learn COBOL.
53+
* Programmer Productivity.
5854
@end menu
5955
@comment *********************************************************************
6056
@comment ** 1.2.1 Why YOU Should Learn COBOL **
6157
@comment *********************************************************************
62-
@newsubsection{1.2.1,Why YOU Should Learn COBOL}
58+
@newsubsection{Why YOU Should Learn COBOL}
6359
Despite statements from industry ``insiders'', the COBOL programming language is not dead, even though newer and so-called ``modern'' languages like Java, C#, .NET, Ruby on Rails and so on appear to have become the languages of choice in the Information Technology world. These languages have become popular because they address the following desired requirements for ``modern'' programming:
6460
@enumerate
6561
@item
@@ -114,7 +110,7 @@ The whole reason you're reading this is that you've discovered GnuCOBOL --- anot
114110
@comment *********************************************************************
115111
@comment ** 1.2.2 Programmer Productivity **
116112
@comment *********************************************************************
117-
@newsubsection{1.2.2,Programmer Productivity}
113+
@newsubsection{Programmer Productivity}
118114
Throughout the history of computer programming, the search for new ways to improve of the productivity of programmers has been a major consideration. Other than hobbyists, programming is an activity performed for money, and businesses abhor spending anything more than is absolutely necessary; even government agencies try to spend as little money on projects as is absolutely necessary.
119115

120116
The amount of programming necessary to accomplish a given task --- including rework needed by any errors found during testing (testing is sometimes jokingly defined as: @i{that time during which an application is actually in production, allowing users to discover the problems}) is the measure of programmer productivity. Anything that reduces that effort will therefore reduce the time spent in such activities therefore reducing the expense of same. When the expense of programming is reduced, programmer productivity is increased.
@@ -138,7 +134,7 @@ The reality is, however, that good programmers have been practising code re-usab
138134
@comment *********************************************************************
139135
@comment ** 1.3 So What is GnuCOBOL? **
140136
@comment *********************************************************************
141-
@newsection{1.3,So What is GnuCOBOL?}
137+
@newsection{So What is GnuCOBOL?}
142138
GnuCOBOL is a free and open sourced COBOL compiler and runtime environment, written using the C programming language which itself is free to use and can be used in all forms including for commercial purposes - there is no restrictions. GnuCOBOL is typically distributed in source-code form, and must then be built for your computer's operating system using the system's C compiler and loader. While originally developed for the UNIX and Linux operating systems, GnuCOBOL has also been successfully built for computers running OSX (a OpenBSD implementation) and Windows utilizing the UNIX-emulation features of such tools as Cygwin and MinGW. Also see the @url{https://savannah.gnu.org/projects/gnucobol, GNU website} for more information.
143139
Pre built Implemeations for Windows can also be found at @url{https://www.arnoldtrembley.com/GnuCOBOL.htm}.
144140

guide/10.texi

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
@comment *********************************************************************
22
@comment ** 10. Interfacing With The OS **
33
@comment *********************************************************************
4-
@newchapter{10,Interfacing With The OS}
4+
@newchapter{Interfacing With The OS}
55
@comment *********************************************************************
66
@comment ** 10.1 Compiling Programs **
77
@comment *********************************************************************
8-
@newsection{10.1,Compiling Programs}
8+
@newsection{Compiling Programs}
99
Program source files should have by convention, extensions of @file{.cob} or @file{.cbl}.
1010

1111
Program file names should match exactly the specification of @code{PROGRAM-ID} (including case).
@@ -26,7 +26,7 @@ These are dynamically-loadable object code files ready to be invoked from other
2626
@comment *********************************************************************
2727
@comment ** 10.1.1 cobc - The GnuCOBOL Compiler - runtime options **
2828
@comment *********************************************************************
29-
@newsubsection{10.1.1,cobc - The GnuCOBOL Compiler - Runtime options}
29+
@newsubsection{cobc - The GnuCOBOL Compiler - Runtime options}
3030
The GnuCOBOL compiler is named @command{cobc} (@command{cobc.exe} on a Windows system).
3131

3232
The following describes the syntax and option switches of the cobc command. This information may be displayed by entering the command @command{cobc --help} or @command{cobc -h}.
@@ -576,7 +576,7 @@ Later, when you wish to compile a calling program and combine any needed assembl
576576
@comment *********************************************************************
577577
@comment ** 10.1.1.1 -X GnuCOBOL Compiler option -Xref **
578578
@comment *********************************************************************
579-
@newsubsection{10.1.1.1,cobc option -Xref an example}
579+
@newsubsection{cobc option -Xref an example}
580580
The following shows the output from using -Xref.
581581
@verbatim
582582
@@ -652,7 +652,7 @@ E prog 27
652652
@comment *********************************************************************
653653
@comment ** 10.1.1.2 Cross reference using cobxref **
654654
@comment *********************************************************************
655-
@newsubsection{10.1.1.2, Cross Reference listing using cobxref}
655+
@newsubsection{ Cross Reference listing using cobxref}
656656
This program is found in the contrib area or by itself in Sourceforge under its own name
657657
(@code{cobxref}).
658658

@@ -740,7 +740,7 @@ None
740740
@comment *********************************************************************
741741
@comment ** 10.1.2 Compilation Time Environment Variables **
742742
@comment *********************************************************************
743-
@newsubsection{10.1.2,Compilation Time Environment Variables}
743+
@newsubsection{Compilation Time Environment Variables}
744744
@anchoridx{Environment Variables: Compilation-Time}
745745

746746
The following are the various environment variables that can play a role in the compilation of GnuCOBOL programs.
@@ -795,7 +795,7 @@ cobc -i
795795
@comment *********************************************************************
796796
@comment ** 10.1.3 Predefined Compilation Variables **
797797
@comment *********************************************************************
798-
@newsubsection{10.1.3,Predefined Compilation Variables}
798+
@newsubsection{Predefined Compilation Variables}
799799
GnuCOBOL defines compilation variables when certain conditions are true.
800800

801801
If the condition associated with a variable is false, the variable is not defined during compilations.
@@ -895,7 +895,7 @@ GnuCOBOL is compiling the source unit.
895895
@comment ** 10.1.4 Locating Copybooks **
896896
@comment *********************************************************************
897897
@page
898-
@newsubsection{10.1.4,Locating Copybooks}
898+
@newsubsection{Locating Copybooks}
899899
The GnuCOBOL compiler will attempt to locate copybooks by searching for them in the following folders. The search will occur in the sequence shown below, and will terminate once a copybook is found.
900900
@enumerate
901901
@item
@@ -959,7 +959,7 @@ Case-folding may also be turned on and off within the program source code using
959959
@comment *********************************************************************
960960
@comment ** 10.1.5 Compiler Configuration Files **
961961
@comment *********************************************************************
962-
@newsubsection{10.1.5,Compiler Configuration Files}
962+
@newsubsection{Compiler Configuration Files}
963963
GnuCOBOL uses compiler configuration files to define various options that will control the compilation process. These configuration files are specified using the
964964
@switchidx{-conf} compilation switch and are found in the folder defined by the @envvarcompile{COB_CONFIG_DIR}.
965965

@@ -1275,12 +1275,12 @@ reserved: ZEROS=ZERO
12751275
@comment ** 10.2 Running Programs **
12761276
@comment *********************************************************************
12771277
@page
1278-
@newsection{10.2,Running Programs}
1278+
@newsection{Running Programs}
12791279
Once GnuCOBOL programs have been compiled into either directly-executable programs (created via the @switch{-x}) or dynamically-loadable libraries (created via the @switch{-m}), those programs may be executed from any shell environment. The exact manner in which the two are executed will differ, as described in the upcoming sections.
12801280
@comment *********************************************************************
12811281
@comment ** 10.2.1 Direct Execution **
12821282
@comment *********************************************************************
1283-
@newsubsection{10.2.1,Direct Execution}
1283+
@newsubsection{Direct Execution}
12841284
GnuCOBOL programs compiled with the
12851285
@switchidx{-x} will be generated as directly-executable programs. For example, a native Windows or Windows/MinGW build of GnuCOBOL will generate an @file{.exe} file when the @switch{-x} switch is specified to the compiler.
12861286

@@ -1308,12 +1308,12 @@ C:\\Users\\Me\\Documents\\Programs\\printaccount.exe ACCT=6625378
13081308
@comment *********************************************************************
13091309
@comment ** 10.2.2 Executing Dynamically-Loadable Libraries **
13101310
@comment *********************************************************************
1311-
@newsubsection{10.2.2,Executing Dynamically-Loadable Libraries}
1311+
@newsubsection{Executing Dynamically-Loadable Libraries}
13121312
As discussed previously, dynamically-loadable libraries are created via the compiler's @switch{-m}. Once so created, the program(s) in these libraries are executed from the command line (via the GnuCOBOL @code{cobcrun} utility), or as dynamically-loadable subprograms.
13131313
@comment *********************************************************************
13141314
@comment ** 10.2.2.1 cobcrun - Command-line Execution **
13151315
@comment *********************************************************************
1316-
@newunit{10.2.2.1,cobcrun - Command-line Execution}
1316+
@newsubsubsection{cobcrun - Command-line Execution}
13171317
It is possible to generate executable modules for all GnuCOBOL programs, not just subprograms, by choosing to use the
13181318
@switchidx{-m} option to specify the loader output format, even for main programs.
13191319

@@ -1364,7 +1364,7 @@ cobcrun printaccount.exe acct=6625378
13641364
@comment *********************************************************************
13651365
@comment ** 10.2.2.2 Dynamically Loaded Subprograms **
13661366
@comment *********************************************************************
1367-
@newunit{10.2.2.2,Dynamically Loaded Subprograms}
1367+
@newsubsubsection{Dynamically Loaded Subprograms}
13681368
Dynamically-loaded subprograms are executed (from a COBOL syntax point of view) just like any other subprograms. What makes them unique, however, is that they are loaded into memory only when they are actually used the first time during the execution of a program.
13691369

13701370
When a dynamically-loadable module needs to be loaded (because it is not already in memory from a previous subprogram execution), the dynamically-loadable library will be sought by libcob in each directory named in the library specified by the
@@ -1381,7 +1381,7 @@ It is possible, however, to automatically cause all library names to 'fold' to u
13811381
@comment *********************************************************************
13821382
@comment ** 10.2.3 Run Time Environment Variables **
13831383
@comment *********************************************************************
1384-
@newsubsection{10.2.3,Run Time Environment Variables}
1384+
@newsubsection{Run Time Environment Variables}
13851385
@anchoridx{Environment Variables: Run-Time}
13861386

13871387
The following is a list of the various environment variables that can play a role in the execution of GnuCOBOL programs.
@@ -1430,7 +1430,7 @@ One of these environment variables must be set to a directory/folder appropriate
14301430
Also used during execution of programs is runtime.cfg also found in @code{/usr/local/share/gnucobol/config}
14311431
for *nix and this file can also be changed to match your environment if needed.
14321432
When viewing, note the Default settings.
1433-
@newunit{10.2.3.1,General instructions}
1433+
@newsubsubsection{General instructions}
14341434

14351435
@verbatim
14361436
The initial runtime.cfg file is found in the $COB_CONFIG_DIR/config
@@ -1484,7 +1484,7 @@ When viewing, note the Default settings.
14841484
of the comments from the actual real configuration file that is processed
14851485
@end verbatim
14861486

1487-
@newunit{10.2.3.2,General Environment}
1487+
@newsubsubsection{General Environment}
14881488
@verbatim
14891489
14901490
Environment name: COB_DISABLE_WARNINGS
@@ -1591,7 +1591,7 @@ For v4.0+
15911591
Example: COB_CURRENT_DATE "2016/03/16 16:40:52"
15921592
current_date YYYYMMDDHHMMSS+01:00
15931593
@end verbatim
1594-
@newunit{10.2.3.3,Call Environment}
1594+
@newsubsubsection{Call Environment}
15951595
@verbatim
15961596
15971597
Environment name: COB_LIBRARY_PATH
@@ -1632,7 +1632,7 @@ For v4.0+
16321632
Example: PHYSICAL_CANCEL TRUE
16331633
16341634
@end verbatim
1635-
@newunit{10.2.3.4,File I/O}
1635+
@newsubsubsection{File I/O}
16361636
@verbatim
16371637
16381638
Environment name: COB_VARSEQ_FORMAT
@@ -1878,7 +1878,7 @@ For v4.0+
18781878
Example: SORT_CHUNK 1M
18791879
18801880
@end verbatim
1881-
@newunit{10.2.3.5,Screen I/O}
1881+
@newsubsubsection{Screen I/O}
18821882
@verbatim
18831883
18841884
Environment name: COB_BELL
@@ -2011,7 +2011,7 @@ For v4.0+
20112011
Example: COB_EXIT_MSG '@w{}'
20122012
20132013
@end verbatim
2014-
@newunit{10.2.3.6,Report I/O}
2014+
@newsubsubsection{Report I/O}
20152015
@verbatim
20162016
20172017
Environment name: COB_COL_JUST_LRC
@@ -2024,7 +2024,7 @@ For v4.0+
20242024
Example: col_just_lrc True
20252025
20262026
@end verbatim
2027-
@newunit{10.2.3.7,File I/O Environment Variables and/or dictionary file}
2027+
@newsubsubsection{File I/O Environment Variables and/or dictionary file}
20282028
@verbatim
20292029
20302030
GnuCOBOL 4.+ only!
@@ -2094,7 +2094,7 @@ little_endian Set internal 'int' byte order to LITTLE ENDIAN
20942094
@comment *********************************************************************
20952095
@comment ** 10.2.4 Program Arguments **
20962096
@comment *********************************************************************
2097-
@newsubsection{10.2.4,Program Arguments}
2097+
@newsubsection{Program Arguments}
20982098
Regardless of the manner in which a main program is executed (i.e. directly or via @code{cobcrun}), any arguments specified to the program may be retrieved via any of the following:
20992099
@itemize @bullet
21002100
@item
@@ -2105,7 +2105,7 @@ Regardless of the manner in which a main program is executed (i.e. directly or v
21052105
@comment *********************************************************************
21062106
@comment ** 10.3 Binary Truncation **
21072107
@comment *********************************************************************
2108-
@newsection{10.3,Binary Truncation}
2108+
@newsection{Binary Truncation}
21092109
By default, the GnuCOBOL compiler will truncate binary data items to the precision indicated by their @syntaxref{PICTURE} clause, if they have one. This applies to COMP, BINARY and COMP-4 items Only.
21102110
@* The fact is, however, that binary truncation has a significant effect on the performance of GnuCOBOL programs. When binary truncation is in effect, arithmetic operations performed against all types of numeric data items (even @code{USAGE DISPLAY}) are slowed down.
21112111

0 commit comments

Comments
 (0)