From f4970c2344e01bea198dc7cc95828a390151ee02 Mon Sep 17 00:00:00 2001 From: Fabrice Le Fessant Date: Sat, 13 Jan 2024 14:38:22 +0100 Subject: [PATCH] Remove all numbers on sections As a result, most numbers are not changed, but appendices have different numbers, especially C1..C4 --- guide/1.texi | 26 +- guide/10.texi | 48 ++-- guide/11.texi | 110 +++---- guide/12.texi | 26 +- guide/13.texi | 6 +- guide/2.texi | 94 +++--- guide/3.texi | 58 ++-- guide/4.texi | 2 +- guide/5.texi | 36 +-- guide/6.texi | 344 +++++++++++----------- guide/7.texi | 554 +++++++++++++++++------------------ guide/8.texi | 686 ++++++++++++++++++++++---------------------- guide/9.texi | 52 ++-- guide/A.texi | 4 +- guide/B.texi | 2 +- guide/C.texi | 10 +- guide/D.texi | 2 +- guide/E.texi | 2 +- guide/F1.texi | 2 +- guide/Macros.texi | 30 +- guide/gnucobpg.texi | 335 ++------------------- guide/gnucobpr.texi | 568 ++++++++++++++++++------------------ guide/gnucobqr.texi | 32 +-- guide/gnucobsp.texi | 28 +- guide/updates.texi | 2 +- 25 files changed, 1380 insertions(+), 1679 deletions(-) diff --git a/guide/1.texi b/guide/1.texi index d48ec4c..3126911 100644 --- a/guide/1.texi +++ b/guide/1.texi @@ -1,7 +1,7 @@ @comment ********************************************************************* @comment ** 1. Introduction ** @comment ********************************************************************* -@newchapter{1,Introduction} +@newchapter{Introduction} This document describes the syntax, semantics and use of the COBOL programming language as implemented by GnuCOBOL, formerly known as OpenCOBOL. 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 Yet another document which delves deeper in to the compiler that is a @i{must} read, is the FAQ available via the GnuCOBOL @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. @menu -* 1.1: Additional Reference Sources. -* 1.2: Introducing COBOL. -@detailmenu -* 1.2.1: Why YOU Should Learn COBOL. -* 1.2.2: Programmer Productivity. -@end detailmenu -* 1.3: So What is GnuCOBOL?. +* Additional Reference Sources. +* Introducing COBOL. +* So What is GnuCOBOL?. @end menu @comment ********************************************************************* @comment ** 1.1 Additional Reference Sources ** @comment ********************************************************************* -@newsection{1.1,Additional Reference Sources} +@newsection{Additional Reference Sources} For those wishing to learn COBOL for the first time, Gary can strongly recommend the following resources. 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 @comment ********************************************************************* @comment ** 1.2 Introducing COBOL ** @comment ********************************************************************* -@newsection{1.2,Introducing COBOL} +@newsection{Introducing COBOL} 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}. 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. 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. @menu -* 1.2.1: Why YOU Should Learn COBOL. -* 1.2.2: Programmer Productivity. +* Why YOU Should Learn COBOL. +* Programmer Productivity. @end menu @comment ********************************************************************* @comment ** 1.2.1 Why YOU Should Learn COBOL ** @comment ********************************************************************* -@newsubsection{1.2.1,Why YOU Should Learn COBOL} +@newsubsection{Why YOU Should Learn COBOL} 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: @enumerate @item @@ -114,7 +110,7 @@ The whole reason you're reading this is that you've discovered GnuCOBOL --- anot @comment ********************************************************************* @comment ** 1.2.2 Programmer Productivity ** @comment ********************************************************************* -@newsubsection{1.2.2,Programmer Productivity} +@newsubsection{Programmer Productivity} 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. 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 @comment ********************************************************************* @comment ** 1.3 So What is GnuCOBOL? ** @comment ********************************************************************* -@newsection{1.3,So What is GnuCOBOL?} +@newsection{So What is GnuCOBOL?} 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. Pre built Implemeations for Windows can also be found at @url{https://www.arnoldtrembley.com/GnuCOBOL.htm}. diff --git a/guide/10.texi b/guide/10.texi index 2dda8f2..d9dad12 100644 --- a/guide/10.texi +++ b/guide/10.texi @@ -1,11 +1,11 @@ @comment ********************************************************************* @comment ** 10. Interfacing With The OS ** @comment ********************************************************************* -@newchapter{10,Interfacing With The OS} +@newchapter{Interfacing With The OS} @comment ********************************************************************* @comment ** 10.1 Compiling Programs ** @comment ********************************************************************* -@newsection{10.1,Compiling Programs} +@newsection{Compiling Programs} Program source files should have by convention, extensions of @file{.cob} or @file{.cbl}. 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 @comment ********************************************************************* @comment ** 10.1.1 cobc - The GnuCOBOL Compiler - runtime options ** @comment ********************************************************************* -@newsubsection{10.1.1,cobc - The GnuCOBOL Compiler} +@newsubsection{cobc - The GnuCOBOL Compiler} The GnuCOBOL compiler is named @command{cobc} (@command{cobc.exe} on a Windows system). 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 @comment ********************************************************************* @comment ** 10.1.1.1 -X GnuCOBOL Compiler option -Xref ** @comment ********************************************************************* -@newsubsection{10.1.1.1,cobc option -Xref an example} +@newsubsection{cobc option -Xref an example} The following shows the output from using -Xref. @verbatim @@ -652,7 +652,7 @@ E prog 27 @comment ********************************************************************* @comment ** 10.1.1.2 Cross reference using cobxref ** @comment ********************************************************************* -@newsubsection{10.1.1.2, Cross Reference listing using cobxref} +@newsubsection{ Cross Reference listing using cobxref} This program is found in the contrib area or by itself in Sourceforge under its own name (@code{cobxref}). @@ -740,7 +740,7 @@ None @comment ********************************************************************* @comment ** 10.1.2 Compilation Time Environment Variables ** @comment ********************************************************************* -@newsubsection{10.1.2,Compilation Time Environment Variables} +@newsubsection{Compilation Time Environment Variables} @anchoridx{Environment Variables: Compilation-Time} The following are the various environment variables that can play a role in the compilation of GnuCOBOL programs. @@ -795,7 +795,7 @@ cobc -i @comment ********************************************************************* @comment ** 10.1.3 Predefined Compilation Variables ** @comment ********************************************************************* -@newsubsection{10.1.3,Predefined Compilation Variables} +@newsubsection{Predefined Compilation Variables} GnuCOBOL defines compilation variables when certain conditions are true. 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. @comment ** 10.1.4 Locating Copybooks ** @comment ********************************************************************* @page -@newsubsection{10.1.4,Locating Copybooks} +@newsubsection{Locating Copybooks} 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. @enumerate @item @@ -959,7 +959,7 @@ Case-folding may also be turned on and off within the program source code using @comment ********************************************************************* @comment ** 10.1.5 Compiler Configuration Files ** @comment ********************************************************************* -@newsubsection{10.1.5,Compiler Configuration Files} +@newsubsection{Compiler Configuration Files} GnuCOBOL uses compiler configuration files to define various options that will control the compilation process. These configuration files are specified using the @switchidx{-conf} compilation switch and are found in the folder defined by the @envvarcompile{COB_CONFIG_DIR}. @@ -1275,12 +1275,12 @@ reserved: ZEROS=ZERO @comment ** 10.2 Running Programs ** @comment ********************************************************************* @page -@newsection{10.2,Running Programs} +@newsection{Running Programs} 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. @comment ********************************************************************* @comment ** 10.2.1 Direct Execution ** @comment ********************************************************************* -@newsubsection{10.2.1,Direct Execution} +@newsubsection{Direct Execution} GnuCOBOL programs compiled with the @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. @@ -1308,12 +1308,12 @@ C:\\Users\\Me\\Documents\\Programs\\printaccount.exe ACCT=6625378 @comment ********************************************************************* @comment ** 10.2.2 Executing Dynamically-Loadable Libraries ** @comment ********************************************************************* -@newsubsection{10.2.2,Executing Dynamically-Loadable Libraries} +@newsubsection{Executing Dynamically-Loadable Libraries} 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. @comment ********************************************************************* @comment ** 10.2.2.1 cobcrun - Command-line Execution ** @comment ********************************************************************* -@newunit{10.2.2.1,cobcrun - Command-line Execution} +@newsubsubsection{cobcrun - Command-line Execution} It is possible to generate executable modules for all GnuCOBOL programs, not just subprograms, by choosing to use the @switchidx{-m} option to specify the loader output format, even for main programs. @@ -1364,7 +1364,7 @@ cobcrun printaccount.exe acct=6625378 @comment ********************************************************************* @comment ** 10.2.2.2 Dynamically Loaded Subprograms ** @comment ********************************************************************* -@newunit{10.2.2.2,Dynamically Loaded Subprograms} +@newsubsubsection{Dynamically Loaded Subprograms} 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. 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 @comment ********************************************************************* @comment ** 10.2.3 Run Time Environment Variables ** @comment ********************************************************************* -@newsubsection{10.2.3,Run Time Environment Variables} +@newsubsection{Run Time Environment Variables} @anchoridx{Environment Variables: Run-Time} 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 Also used during execution of programs is runtime.cfg also found in @code{/usr/local/share/gnucobol/config} for *nix and this file can also be changed to match your environment if needed. When viewing, note the Default settings. -@newunit{10.2.3.1,General instructions} +@newsubsubsection{General instructions} @verbatim The initial runtime.cfg file is found in the $COB_CONFIG_DIR/config @@ -1484,7 +1484,7 @@ When viewing, note the Default settings. of the comments from the actual real configuration file that is processed @end verbatim -@newunit{10.2.3.2,General Environment} +@newsubsubsection{General Environment} @verbatim Environment name: COB_DISABLE_WARNINGS @@ -1591,7 +1591,7 @@ For v4.0+ Example: COB_CURRENT_DATE "2016/03/16 16:40:52" current_date YYYYMMDDHHMMSS+01:00 @end verbatim -@newunit{10.2.3.3,Call Environment} +@newsubsubsection{Call Environment} @verbatim Environment name: COB_LIBRARY_PATH @@ -1632,7 +1632,7 @@ For v4.0+ Example: PHYSICAL_CANCEL TRUE @end verbatim -@newunit{10.2.3.4,File I/O} +@newsubsubsection{File I/O} @verbatim Environment name: COB_VARSEQ_FORMAT @@ -1878,7 +1878,7 @@ For v4.0+ Example: SORT_CHUNK 1M @end verbatim -@newunit{10.2.3.5,Screen I/O} +@newsubsubsection{Screen I/O} @verbatim Environment name: COB_BELL @@ -2011,7 +2011,7 @@ For v4.0+ Example: COB_EXIT_MSG '@w{}' @end verbatim -@newunit{10.2.3.6,Report I/O} +@newsubsubsection{Report I/O} @verbatim Environment name: COB_COL_JUST_LRC @@ -2024,7 +2024,7 @@ For v4.0+ Example: col_just_lrc True @end verbatim -@newunit{10.2.3.7,File I/O Environment Variables and/or dictionary file} +@newsubsubsection{File I/O Environment Variables and/or dictionary file} @verbatim GnuCOBOL 4.+ only! @@ -2094,7 +2094,7 @@ little_endian Set internal 'int' byte order to LITTLE ENDIAN @comment ********************************************************************* @comment ** 10.2.4 Program Arguments ** @comment ********************************************************************* -@newsubsection{10.2.4,Program Arguments} +@newsubsection{Program Arguments} 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: @itemize @bullet @item @@ -2105,7 +2105,7 @@ Regardless of the manner in which a main program is executed (i.e. directly or v @comment ********************************************************************* @comment ** 10.3 Binary Truncation ** @comment ********************************************************************* -@newsection{10.3,Binary Truncation} +@newsection{Binary Truncation} 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. @* 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. diff --git a/guide/11.texi b/guide/11.texi index a6a8304..1bc6583 100644 --- a/guide/11.texi +++ b/guide/11.texi @@ -1,39 +1,39 @@ @comment ********************************************************************* @comment ** 11. Sub-Programming ** @comment ********************************************************************* -@newchapter{11,Sub-Programming} +@newchapter{Sub-Programming} @menu -* 11.1: Subprogram Types. -* 11.2: Independent vs Contained vs Nested Subprograms. -* 11.3: Alternate Entry Points. -* 11.4: Dynamic vs Static Subprograms. -* 11.5: Subprogram Execution Flow. +* Subprogram Types. +* Independent vs Contained vs Nested Subprograms. +* Alternate Entry Points. +* Dynamic vs Static Subprograms. +* Subprogram Execution Flow. @detailmenu -* 11.5.1: Subroutine Execution Flow. -* 11.5.2: User-Defined Function Execution Flow. +* Subroutine Execution Flow. +* User-Defined Function Execution Flow. @end detailmenu -* 11.6: Sharing Data Between Calling and Called Programs. +* Sharing Data Between Calling and Called Programs. @detailmenu -* 11.6.1: Subprogram Arguments. -* 11.6.1.1: Calling Program Considerations. -* 11.6.1.2: Called Program Considerations. -* 11.6.2: GLOBAL Data Items. -* 11.6.3: EXTERNAL Data Items. +* Subprogram Arguments. +* Calling Program Considerations. +* Called Program Considerations. +* GLOBAL Data Items. +* EXTERNAL Data Items. @end detailmenu -* 11.7: Recursive Subprograms. -* 11.8: Combining GnuCOBOL and C Programs. +* Recursive Subprograms. +* Combining GnuCOBOL and C Programs. @detailmenu -* 11.8.1: GnuCOBOL Run-Time Library Requirements. -* 11.8.2: String Allocation Differences Between GnuCOBOL and C. -* 11.8.3: Matching C Data Types with GnuCOBOL USAGE's. -* 11.8.4: GnuCOBOL Main Programs CALLing C Subprograms. -* 11.8.5: C Main Programs Calling GnuCOBOL Subprograms. +* GnuCOBOL Run-Time Library Requirements. +* String Allocation Differences Between GnuCOBOL and C. +* Matching C Data Types with GnuCOBOL USAGE's. +* GnuCOBOL Main Programs CALLing C Subprograms. +* C Main Programs Calling GnuCOBOL Subprograms. @end detailmenu @end menu @comment ********************************************************************* @comment ** 11.1 Subprogram Types ** @comment ********************************************************************* -@newsection{11.1,Subprogram Types} +@newsection{Subprogram Types} Simply stated, a @define{Subprogram} is a program that is invoked by another program; the subprogram performs whatever its designed operations are and --- when complete --- typically returns control back to the program that invoked it. There are two different types of subprograms supported by GnuCOBOL, subroutines and user-defined functions. The distinction between these two subprogram types lies in the manner in which they are executed. @@ -56,7 +56,7 @@ Both subroutines and user-defined functions may return a value. The value they @comment ********************************************************************* @comment ** 11.2 Independent vs Contained vs Nested Subprograms ** @comment ********************************************************************* -@newsection{11.2,Independent vs Contained vs Nested Subprograms} +@newsection{Independent vs Contained vs Nested Subprograms} Subprograms (either subroutines or user-defined functions) can be implemented in three different ways. @table @asis @@ -119,7 +119,7 @@ The @code{END PROGRAM PROG1.} marker, since it is the last line in the source fi @comment ********************************************************************* @comment ** 11.3 Alternate Entry Points ** @comment ********************************************************************* -@newsection{11.3,Alternate Entry Points} +@newsection{Alternate Entry Points} Any subroutine may have multiple entry-points defined within it. This means the subroutine could be called either via a @code{CALL '@var{program-id}'} or a @code{CALL '@var{entry-point}'} statement. There may be any number of alternate entry-points defined within a subroutine. @@ -135,7 +135,7 @@ When an alternate entry-point is called, execution within the subroutine will be @comment ********************************************************************* @comment ** 11.4 Dynamic vs Static Subprograms ** @comment ********************************************************************* -@newsection{11.4,Dynamic vs Static Subprograms} +@newsection{Dynamic vs Static Subprograms} Any subprogram may be either statically or dynamically loaded into memory. @@ -208,17 +208,17 @@ Consult the documentation on the @comment ********************************************************************* @comment ** 11.5 Subprogram Execution Flow ** @comment ********************************************************************* -@newsection{11.5,Subprogram Execution Flow} +@newsection{Subprogram Execution Flow} When a subprogram is invoked, the flow of execution will differ slightly depending on whether the subprogram is a subroutine or a user-defined function. @menu -* 11.5.1: Subroutine Execution Flow. -* 11.5.2: User-Defined Function Execution Flow. +* Subroutine Execution Flow. +* User-Defined Function Execution Flow. @end menu @comment ********************************************************************* @comment ** 11.5.1 Subroutine Execution Flow ** @comment ********************************************************************* -@newsubsection{11.5.1,Subroutine Execution Flow} +@newsubsection{Subroutine Execution Flow} When a subroutine is @code{CALL}ed: @enumerate @@ -281,7 +281,7 @@ Execution will resume back in the calling program with the first executable stat @comment ********************************************************************* @comment ** 11.5.2 User-Defined Function Execution Flow ** @comment ********************************************************************* -@newsubsection{11.5.2,User-Defined Function Execution Flow} +@newsubsection{User-Defined Function Execution Flow} When a user-defined function is executed: @enumerate @@ -331,28 +331,28 @@ Execution will resume back in the calling program at the point where the returne @comment ** 11.6 Sharing Data Between Calling and Called Programs ** @comment ********************************************************************* @page -@newsection{11.6,Sharing Data Between Calling and Called Programs} +@newsection{Sharing Data Between Calling and Called Programs} @menu -* 11.6.1: Subprogram Arguments. +* Subprogram Arguments. @detailmenu -* 11.6.1.1: Calling Program Considerations. -* 11.6.1.2: Called Program Considerations. +* Calling Program Considerations. +* Called Program Considerations. @end detailmenu -* 11.6.2: GLOBAL Data Items. -* 11.6.3: EXTERNAL Data Items. +* GLOBAL Data Items. +* EXTERNAL Data Items. @end menu @comment ********************************************************************* @comment ** 11.6.1 Subprogram Arguments ** @comment ********************************************************************* -@newsubsection{11.6.1,Subprogram Arguments} +@newsubsection{Subprogram Arguments} @menu -* 11.6.1.1: Calling Program Considerations. -* 11.6.1.2: Called Program Considerations. +* Calling Program Considerations. +* Called Program Considerations. @end menu @comment ********************************************************************* @comment ** 11.6.1.1 Calling Program Considerations ** @comment ********************************************************************* -@newunit{11.6.1.1,Calling Program Considerations} +@newsubsubsection{Calling Program Considerations} Data items defined in a calling program may be passed to either type of called program (subroutine or user-defined function) as arguments. @@ -406,7 +406,7 @@ Arguments to user-defined functions are always passed @code{BY REFERENCE}. @comment ********************************************************************* @comment ** 11.6.1.2 Called Program Considerations ** @comment ********************************************************************* -@newunit{11.6.1.2,Called Program Considerations} +@newsubsubsection{Called Program Considerations} When coding a GnuCOBOL subprogram (a subroutine or user-defined function), all arguments to the subprogram must be defined in the subprogram's linkage section. @@ -425,7 +425,7 @@ If the subprogram returns a value, the data item in which the value is returned @comment ********************************************************************* @comment ** 11.6.2 GLOBAL Data Items ** @comment ********************************************************************* -@newsubsection{11.6.2,GLOBAL Data Items} +@newsubsection{GLOBAL Data Items} Another way in which a data item may be shared between a calling program (@i{A}) and a called program (@i{B}) is by defining the data item in the calling program and attaching the @syntaxref{GLOBAL} clause to it so that it may be used within the called program. In order for this to work, program @i{B} (the one called by program @i{A}) must be a nested subprogram within program @i{A}. @@ -464,7 +464,7 @@ DemoGLOBAL: ********** @comment ********************************************************************* @comment ** 11.6.3 EXTERNAL Data Items ** @comment ********************************************************************* -@newsubsection{11.6.3,EXTERNAL Data Items} +@newsubsection{EXTERNAL Data Items} The final way in which a data item may be shared between a calling program (@i{A}) and a called program (@i{B}) is by defining the data item (with the same name) in both programs and attaching the @syntaxref{EXTERNAL} clause to it (again, in both programs). This approach works regardless of whether the called program is nested within the calling program or not. It also works even if the two programs are compiled separately. @@ -506,7 +506,7 @@ DemoEXTERNAL: ********** @comment ********************************************************************* @comment ** 11.7 Recursive Subprograms ** @comment ********************************************************************* -@newsection{11.7,Recursive Subprograms} +@newsection{Recursive Subprograms} A subroutine may @code{CALL} itself, either directly or indirectly from another subroutine or user-defined function that it @code{CALL}s. Any subroutine that indulges in this sort of behaviour (called recursion) is called a @define{Recursive Subprogram}. @@ -639,26 +639,26 @@ Leaving RECURSIVEFUNC Returning +0000000720 @comment ********************************************************************* @comment ** 11.8 Combining GnuCOBOL and C Programs ** @comment ********************************************************************* -@newsection{11.8,Combining GnuCOBOL and C Programs} +@newsection{Combining GnuCOBOL and C Programs} The upcoming sections deal the issues pertaining to calling C language programs from GnuCOBOL programs, and vice versa. Two additional sections provide samples illustrating specifics as to how those issues are overcome in actual program code. @menu -* 11.8.1: GnuCOBOL Run-Time Library Requirements. -* 11.8.2: String Allocation Differences Between GnuCOBOL and C. -* 11.8.3: Matching C Data Types with GnuCOBOL USAGE's. -* 11.8.4: GnuCOBOL Main Programs CALLing C Subprograms. -* 11.8.5: C Main Programs Calling GnuCOBOL Subprograms. +* GnuCOBOL Run-Time Library Requirements. +* String Allocation Differences Between GnuCOBOL and C. +* Matching C Data Types with GnuCOBOL USAGE's. +* GnuCOBOL Main Programs CALLing C Subprograms. +* C Main Programs Calling GnuCOBOL Subprograms. @end menu @comment ********************************************************************* @comment ** 11.8.1 GnuCOBOL Run-Time Library Requirements ** @comment ********************************************************************* -@newsubsection{11.8.1,GnuCOBOL Run-Time Library Requirements} +@newsubsection{GnuCOBOL Run-Time Library Requirements} Like most other implementations of the COBOL language, GnuCOBOL utilizes a run-time library. When the first program executed in a given execution sequence is a GnuCOBOL program, any run-time library initialization will be performed by the compiled COBOL code in a manner that is transparent to the C-language programmer. If, however, a C program is the first to execute, the burden of performing GnuCOBOL run-time library initialization falls upon the C program. @xref{C Main Programs Calling GnuCOBOL Subprograms}, for an example of how to do this. @comment ********************************************************************* @comment ** 11.8.2 String Allocation Differences Between GnuCOBOL and C ** @comment ********************************************************************* -@newsubsection{11.8.2,String Allocation Differences Between GnuCOBOL and C} +@newsubsection{String Allocation Differences Between GnuCOBOL and C} Both languages store strings as a fixed-length continuous sequence of characters. @@ -702,7 +702,7 @@ INSPECT Data-From-a-C-Program @comment ********************************************************************* @comment ** 11.8.3 Matching C Data Types with GnuCOBOL USAGE's ** @comment ********************************************************************* -@newsubsection{11.8.3,Matching C Data Types with GnuCOBOL USAGE's} +@newsubsection{Matching C Data Types with GnuCOBOL USAGE's} Matching up GnuCOBOL numeric Usage's with their C language data type equivalents is possible via the following chart: @float @@ -739,7 +739,7 @@ These sizes conform to the COBOL standard and the minimum sizes of the COBOL typ @comment ********************************************************************* @comment ** 11.8.4 GnuCOBOL Main Programs CALLing C Subprograms ** @comment ********************************************************************* -@newsubsection{11.8.4,GnuCOBOL Main Programs CALLing C Subprograms} +@newsubsection{GnuCOBOL Main Programs CALLing C Subprograms} Here's a sample of a GnuCOBOL program that CALLs a C subprogram. @smallformat @@ -806,7 +806,7 @@ Did you notice the output showing the contents of @code{Arg1} after the subrouti @comment ********************************************************************* @comment ** 11.8.5 C Main Programs Calling GnuCOBOL Subprograms ** @comment ********************************************************************* -@newsubsection{11.8.5,C Main Programs Calling GnuCOBOL Subprograms} +@newsubsection{C Main Programs Calling GnuCOBOL Subprograms} Now, the roles of the two languages in the previous section will be reversed, having a C main program execute a GnuCOBOL subprogram. @smallformat diff --git a/guide/12.texi b/guide/12.texi index 87c32e0..7d83969 100644 --- a/guide/12.texi +++ b/guide/12.texi @@ -1,22 +1,22 @@ @comment ********************************************************************* @comment ** 12. Programming Style Suggestions ** @comment ********************************************************************* -@newchapter{12,Programming Style Suggestions} +@newchapter{Programming Style Suggestions} This chapter deals with a variety of stylistic issues that may be of interest to someone who is just starting out learning and using COBOL. Much of this chapter makes recommendations and suggestions for how to write your own programs. The sample programs in the @i{Sample Programs} document (@pxref{Top,Top,Top,gnucobsp,Sample Programs}) were coded using almost all of these recommendations. There's no particular order of importance to the topics presented here. @menu -* 12.1: Marking Changes in Programs. -* 12.2: Data Item Coding and Naming Conventions. -* 12.3: Table Subscripting versus Table Indexing. -* 12.4: Copybook Naming Conventions and Usage. -* 12.5: PROCEDURE DIVISION Sections Versus Paragraphs. -* 12.6: COMPUTE Versus ADD-SUBTRACT-MULTIPLY-DIVIDE. +* Marking Changes in Programs. +* Data Item Coding and Naming Conventions. +* Table Subscripting versus Table Indexing. +* Copybook Naming Conventions and Usage. +* PROCEDURE DIVISION Sections Versus Paragraphs. +* COMPUTE Versus ADD-SUBTRACT-MULTIPLY-DIVIDE. @end menu @comment ********************************************************************* @comment ** 12.1,Marking Changes in Programs ** @comment ********************************************************************* -@newsection{12.1, Marking Changes in Programs} +@newsection{Marking Changes in Programs} Historically in the early 60's programs were first punched on to paper tape and by the mid 60's that was replaced almost totally, by punched cards although paper tape was still used by programmers for the odd few changes to their sources held on magnetic tape or disk as a portable paper tape punch could be put in your pocket. Now the problem with punched cards were there was 2,000 cards per box and that they could and did, get dropped. So, cc (column) 1 through 6 had the card sequence number in and that way if a box was dropped they could be feed in to a card sorter to be fixed. This was after the cards was cleaned up so that they were all in the same direction which one corner cut out helped. In the late 70's cards was also on its way out to the point where P.C's started being used (and no they were not made by IBM), so these columns could be used for other purposes including cc 73 - 80 instead of indicating the 8 character program name which was the maximum size allowed on a IBM system. @@ -33,7 +33,7 @@ Marking changes becomes more of a challenge when free-format source code is in e @comment ********************************************************************* @comment ** 12.2 Data Item Coding and Naming Conventions ** @comment ********************************************************************* -@newsection{12.2,Data Item Coding and Naming Conventions} +@newsection{Data Item Coding and Naming Conventions} When programs get very large, it becomes more and more challenging to keep track of the data items that will be used in the program. Here, in no particular order of importance, are a variety of conventions that can simplify that problem. Remember that the points described here are intended to make things easier for you, the programmer. No COBOL compiler cares one way or another whether any of these suggestions are followed. @@ -151,7 +151,7 @@ The ``-FSM-'' acronyms make it easier to locate the description of the 01-item t @comment ********************************************************************* @comment ** 12.3 Table Subscripting versus Table Indexing ** @comment ********************************************************************* -@newsection{12.3,Table Subscripting versus Table Indexing} +@newsection{Table Subscripting versus Table Indexing} The elements of a table may be referenced either using a subscript or an index. Syntactically, this is coded using parenthesis, as per the following three examples, all of which store the letter @samp{A} into the 17th occurrence of a data item named WS-Output-Image-TXT: @enumerate @item @@ -229,7 +229,7 @@ After this command is executed, the file @file{subvsindex.c} will contain the pr @comment ********************************************************************* @comment ** 12.4 Copybook Naming Conventions and Usage ** @comment ********************************************************************* -@newsection{12.4,Copybook Naming Conventions and Usage} +@newsection{Copybook Naming Conventions and Usage} Since the intent of a copybook is to introduce COBOL code into a particular spot in a program via the @statementref{COPY}, it is always a good idea to prefix copybook names with a character sequence that identifies where in a program its contents are intended to be @code{COPY}ed. For example: @@ -249,7 +249,7 @@ Copybooks that contain executable instructions. @comment ********************************************************************* @comment ** 12.5,PROCEDURE DIVISION Sections Versus Paragraphs ** @comment ********************************************************************* -@newsection{12.5,PROCEDURE DIVISION Sections Versus Paragraphs} +@newsection{PROCEDURE DIVISION Sections Versus Paragraphs} The issue of whether to use section and/or paragraph names (collectively referred to as procedure names) within the procedure division is one of near religious significance with many COBOL programmers. COBOL programming standards used by many organizations that use the language generally call for procedure names to: @@ -306,7 +306,7 @@ I do not use @code{THRU} on any @code{MERGE}, @code{PERFORM} or @statement{SORT} @comment ********************************************************************* @comment ** 12.6 COMPUTE Versus ADD-SUBTRACT-MULTIPLY-DIVIDE ** @comment ********************************************************************* -@newsection{12.6,COMPUTE Versus ADD-SUBTRACT-MULTIPLY-DIVIDE} +@newsection{COMPUTE Versus ADD-SUBTRACT-MULTIPLY-DIVIDE} Over the years, there has been much debate over the efficiency and arithmetic accuracy of using the @statementref{COMPUTE} rather than the four basic arithmetic operation statements. Here are the facts --- draw your own conclusions as to which approach is more appropriate under which circumstances. diff --git a/guide/13.texi b/guide/13.texi index a13a695..e884a72 100644 --- a/guide/13.texi +++ b/guide/13.texi @@ -1,16 +1,16 @@ @comment ********************************************************************* @comment ** 13. Programming for XFD ** @comment ********************************************************************* -@newchapter{13,Programming for XFD} +@newchapter{Programming for XFD} This chapter deals with the initial support for ODBC and OCI as file-handlers (so far PostgrSQL, MySQL, SQLite, MSSQL) and OCI, along with new directory COB_SCHEMA_DIR containing the necessary internal schema files to match the file definition to the database table all though usage of $XDF. @menu -* 13.1: GnuCobol use SQL for files. +* GnuCobol use SQL for files. @end menu @comment ********************************************************************* @comment ** 13.1,GnuCobol use SQL for files ** @comment ********************************************************************* -@newsection{13.1,GnuCobol use SQL for files} +@newsection{GnuCobol use SQL for files} The ACUCOBOL compiler has a defined syntax for describing records that can be stored in SQL tables. This is referred to as XFD (extended file descriptor). The various XFD directives are intermixed in the record description of a data file as either $XFD (similar to $SET) or as comments *((XFD … )). Each directive precedes the data item it is affecting. When a program is compiled that has these directives and the compiler is directed by a compile option, then the record layout is written out to a text file which is later used at run-time to process the data records. i.e., facilitate mapping the COBOL data fields to/from SQL columns. The goal of this project is for GnuCOBOL to accept directives similar in syntax to the ACUCOBOL XFD syntax1 (plus a few additions as required) and develop run-time modules to handle all of the COBOL I/O verbs while the data is stored in a SQL table. diff --git a/guide/2.texi b/guide/2.texi index a09a839..a483471 100644 --- a/guide/2.texi +++ b/guide/2.texi @@ -1,7 +1,7 @@ @comment ********************************************************************* @comment ** 2. COBOL Fundamentals ** @comment ********************************************************************* -@newchapter{2,COBOL Fundamentals} +@newchapter{COBOL Fundamentals} This chapter describes the syntax, semantics and usage of the COBOL programming language as implemented by the current version of GnuCOBOL. For the rest of this document the Language is spelt as COBOL to ease reading however the compiler name retains the mixed case of GnuCOBOL. This document is intended to serve as a full-function reference and user's guide suitable for both those readers learning COBOL for the first time as usage as a training tool, as well as those already familiar with some dialects of the COBOL language. @@ -14,11 +14,11 @@ For each implementation of the GnuCOBOL compiler the supplied files NEWS should @comment ********************************************************************* @comment ** 2.1 The COBOL Language ** @comment ********************************************************************* -@newsection{2.1,The COBOL Language - The Basics} +@newsection{The COBOL Language - The Basics} @comment ********************************************************************* @comment ** 2.1.1 Language Reserved Words ** @comment ********************************************************************* -@newsubsection{2.1.1,Language Reserved Words} +@newsubsection{Language Reserved Words} Cobol programs consist of a sequence of words and symbols. Words, which consist of sequences of letters (upper- and/or lower-case), digits, dashes (@samp{-}) and/or underscores (@samp{_}) may have a pre-defined, specific, meaning to the compiler or may be invented by the programmer for his/her purposes. The GnuCOBOL language specification defines well over 1130 @@ -34,7 +34,7 @@ For any given version of GnuCOBOL you can also list the full current set of rese @comment ********************************************************************* @comment ** 2.1.2 User-Defined Words ** @comment ********************************************************************* -@newsubsection{2.1.2,User-Defined Words} +@newsubsection{User-Defined Words} When you write GnuCOBOL programs, you'll need to create a variety of words to represent various aspects of the program, the program's data and the external environment in which the program will run. This will include internal names by which data files will be referenced, data item names and names of executable logic procedures as section and paragraph names. User-defined words may be composed from the characters @samp{A} through @samp{Z} (upper- and/or lower-case), @samp{0} through @samp{9}, dash (@samp{-}) @@ -61,7 +61,7 @@ The point is that, when writing in Cobol, you should always consider is, will th @comment ********************************************************************* @comment ** 2.1.3 Case Insensitivity ** @comment ********************************************************************* -@newsubsection{2.1.3,Case Insensitivity} +@newsubsection{Case Insensitivity} All COBOL implementations allow the use of both upper and lower case letters in program coding. GnuCOBOL is completely insensitive to the case used when writing reserved words or user-defined names. Thus, @code{AAAAA}, @code{aaaaa}, @code{Aaaaa} and @code{AaAaA} are all the same word as far as GnuCOBOL is concerned. The only time the case used does matter is within quoted character strings, where character values will be exactly as coded. @@ -72,7 +72,7 @@ This isn't a bad practice to use in actual programs, as it leads to programs whe @comment ********************************************************************* @comment ** 2.1.4 Readability of Programs ** @comment ********************************************************************* -@newsubsection{2.1.4,Readability of Programs} +@newsubsection{Readability of Programs} Critics of COBOL frequently focus on the wordiness of the language, often citing the case of a so-called ``Hello World'' program as the ``proof'' that COBOL is so much more tedious to program in than more ``modern'' languages. This tedium is cited as such a significant impact to programmer productivity that, in their opinions, COBOL can't go away quickly enough. Here are two different ``Hello World'' applications, one written in Java and the second in GnuCOBOL. First, the Java version: @@ -172,7 +172,7 @@ Legend has it that there's actually only been ONE program ever written in COBOL, @comment ********************************************************************* @comment ** 2.1.5 Divisions Organize Programs ** @comment ********************************************************************* -@newsubsection{2.1.5,Divisions Organize Programs} +@newsubsection{Divisions Organize Programs} COBOL programs are structured into four major areas of coding, each with its own purpose. These four areas are known as divisions. Each division may consist of a variety of sections and each section consists of one or more paragraphs. A paragraph consists of sentences, each of which consists of one or more statements. @@ -182,7 +182,7 @@ This hierarchical structure of program components standardises the composition o @comment ********************************************************************* @comment ** 2.1.6 Copybooks ** @comment ********************************************************************* -@newsubsection{2.1.6,Copybooks} +@newsubsection{Copybooks} @statementref{COPY} A @define{Copybook} is a segment of program code that may be utilized by multiple programs simply by having those programs use the @statement{COPY} to import that code. This code may define files, data structures or procedural code. @@ -190,7 +190,7 @@ Today's current programming languages have a statement (usually, this statement @comment ********************************************************************* @comment ** 2.1.7 Structured Data ** @comment ********************************************************************* -@newsubsection{2.1.7,Structured Data} +@newsubsection{Structured Data} A contiguous area of storage within the memory space of a program that may be referenced, by name, in a COBOL program is referred to as a @define{Data Item}. Other programming languages use the term variable, property or attribute to describe the same thing. @@ -201,7 +201,7 @@ A data item that isn't itself formed from other data items is referred to in COB @comment ********************************************************************* @comment ** 2.1.8 Files ** @comment ********************************************************************* -@newsubsection{2.1.8,Files} +@newsubsection{Files} One of COBOL's strengths is the wide variety of data files it is capable of accessing. GnuCOBOL programs, like those created with other COBOL implementations, need to have the structure of any files they will be reading and/or writing described to them. The highest-level characteristic of a file's structure is defined by specifying the organization of the file, as follows: @table @asis @item @code{ORGANIZATION LINE SEQUENTIAL} @@ -315,7 +315,7 @@ A file description in the @syntaxref{FILE SECTION} will define the structure of @comment ********************************************************************* @comment ** 2.1.9. Table Handling ** @comment ********************************************************************* -@newsubsection{2.1.9,Table Handling} +@newsubsection{Table Handling} Other programming languages have arrays; COBOL has tables. They're basically the same thing. There are two special statements that exist in the COBOL language --- @code{SEARCH} and @code{SEARCH ALL} --- that make finding data in a table easy. @code{SEARCH} searches a table sequentially, stopping only when either a table entry matching one of any number of search conditions is found, or when all table entries have been checked against the search criteria and none matched any of those criteria. @@ -326,7 +326,7 @@ Finally, COBOL has the ability to perform in-place sorts of the data that is fou @comment ********************************************************************* @comment ** 2.1.10. Sorting and Merging Data ** @comment ********************************************************************* -@newsubsection{2.1.10,Sorting and Merging Data} +@newsubsection{Sorting and Merging Data} The COBOL language includes a powerful @statement{SORT} that can sort large amounts of data according to arbitrarily complex key structures. This data may originate from within the program or may be contained in one or more external files. The sorted data may be written automatically to one or more output files or may be processed, record-by-record in the sorted sequence. A companion statement --- @code{MERGE} --- can combine the contents of multiple files together, provided those files are all pre-sorted in a similar manner according to the same key structure. The resulting output will consist of the contents of all of the input files, merged together and sequenced according to the common key structure(s). The output generated by a @statement{MERGE} may be written automatically to one or more output files or may be processed internally by the program. @@ -335,7 +335,7 @@ A special form of the @statement{SORT} also exists just to sort the data that re @comment ********************************************************************* @comment ** 2.1.11. String Manipulation ** @comment ********************************************************************* -@newsubsection{2.1.11,String Manipulation} +@newsubsection{String Manipulation} There have been programming languages designed specifically for the processing of text strings, and there have been programming languages designed for the sole purpose of performing high-powered numerical computations. Most programming languages fall somewhere in the middle. COBOL is no exception, although it does include some very powerful string manipulation capabilities; GnuCOBOL actually has even more string-manipulation capabilities than many other COBOL implementations. The following summarizes GnuCOBOL's string-processing capabilities: @@ -500,7 +500,7 @@ Use of a reference modifier on the string field - @xref{Reference Modifiers}. @comment ********************************************************************* @comment ** 2.1.12. Screen Formatting Features ** @comment ********************************************************************* -@newsubsection{2.1.12,Screen Formatting Features} +@newsubsection{Screen Formatting Features} The COBOL2002 standard formalizes extensions to the COBOL language that allow for the definition and processing of text-based screens, as is a typical function on mainframe and midframe computers as well as on many point-of-sale (i.e. ``cash register'') systems. GnuCOBOL implements virtually all the screen-handling features described by COBOL2002. These features allow fields to be displayed at specific row/column positions, various colors and video attributes to be assigned to screen fields and the pressing of specific function keys (F1, F2, @dots{}) to be detectable. All of this takes place through the auspices of the @syntaxref{SCREEN SECTION} and special formats of the @statementref{ACCEPT} and the @statementref{DISPLAY}. @@ -509,7 +509,7 @@ The COBOL2002 standard, and therefore GnuCOBOL, only covers textual user interfa @comment ********************************************************************* @comment ** 2.1.12.1 A Sample Screen ** @comment ********************************************************************* -@newunit{2.1.12.1,A Sample Screen} +@newsubsubsection{A Sample Screen} A Sample Screen Produced by a GnuCOBOL Program: @iftex @@ -554,7 +554,7 @@ Screens are defined in the screen section of the data division. Once defined, s @comment ********************************************************************* @comment ** 2.1.12.2 Color Palette and Video Attributes ** @comment ********************************************************************* -@newunit{2.1.12.2,Color Palette and Video Attributes} +@newsubsubsection{Color Palette and Video Attributes} GnuCOBOL supports the following visual attribute specifications in the @syntaxref{SCREEN SECTION}: @@ -704,7 +704,7 @@ The rows of each block are numbered with the background color while columns are @comment ********************************************************************* @comment ** 2.1.13. Report Writer Features ** @comment ********************************************************************* -@newsubsection{2.1.13,Report Writer Features} +@newsubsection{Report Writer Features} GnuCOBOL includes an implementation of the Report Writer Control System, or RWCS. The reportwriter module is now fully implemented as of version 3.0. This is a standardized, optional add-on feature to the COBOL language which automates much of the mechanics involved in the generation of printed reports by: @enumerate @item @@ -763,7 +763,7 @@ The @syntaxref{REPORT SECTION} documentation explores the description of reports @comment ********************************************************************* @comment ** 2.1.14. Data Initialization ** @comment ********************************************************************* -@newsubsection{2.1.14,Data Initialization} +@newsubsection{Data Initialization} There are three ways in which data division data gets initialized. @enumerate @item @@ -792,7 +792,7 @@ When the @statementref{ALLOCATE} statement is used to allocate a data item or to @comment ********************************************************************* @comment ** 2.1.15. Syntax Diagram Conventions ** @comment ********************************************************************* -@newsubsection{2.1.15,Syntax Diagram Conventions} +@newsubsection{Syntax Diagram Conventions} Syntax of the GnuCOBOL language will be described in special @i{syntax diagrams} using the following syntactical-description techniques: @table @t @@ -841,7 +841,7 @@ Any of these characters appearing within a syntax diagram are to be interpreted @comment ********************************************************************* @comment ** 2.1.16. Format of Program Source Lines ** @comment ********************************************************************* -@newsubsection{2.1.16,Format of Program Source Lines} +@newsubsection{Format of Program Source Lines} Prior to the COBOL2002 standard, source statements in COBOL programs were structured around 80-column punched cards. This means that each source line in a COBOL program consisted of five different ``areas'', defined by their column number(s). As of the COBOL2002 standard, a second mode now exists for COBOL source code statements --- in this mode of operation, COBOL statements may each be up to 255 characters long, with no specific requirements as to what should appear in which columns. @@ -940,7 +940,7 @@ This is another obsolete area of COBOL statements. This part of every statement @comment ** 2.1.17 Program Structure ** @comment ********************************************************************* @page -@newsubsection{2.1.17,Program Structure} +@newsubsection{Program Structure} @diagram{Complete GnuCOBOL Program,Complete-Program-Info,Complete-Program-TeX,None} Each program consists of up to four @@ -1014,7 +1014,7 @@ Regardless of how many programs comprise a single GnuCOBOL source file, only a s @comment ********************************************************************* @comment ** 2.1.18 Comments ** @comment ********************************************************************* -@newsubsection{2.1.18,Comments} +@newsubsection{Comments} The following information describes how comments may be embedded into GnuCOBOL program source to provide documentation. @multitable @columnfractions .18 .72 @@ -1049,12 +1049,12 @@ Debugging statements may be compiled either by specifying the @switch{-fdebuggin @comment ********************************************************************* @comment ** 2.1.19 Literals ** @comment ********************************************************************* -@newsubsection{2.1.19,Literals} +@newsubsection{Literals} Literals are constant values that will not change during the execution of a program. There are two fundamental types of literals --- numeric and alphanumeric. @comment ********************************************************************* @comment ** 2.1.19.1 Numeric Literals ** @comment ********************************************************************* -@newunit{2.1.19.1,Numeric Literals} +@newsubsubsection{Numeric Literals} A numeric literal @idx{Literals (Numeric)} @itemize @bullet @@ -1103,7 +1103,7 @@ National Literals (Hexadecimal) @code{NX"@var{ character }"}. @comment ********************************************************************* @comment ** 2.1.19.2 Alphanumeric Literals ** @comment ********************************************************************* -@newunit{2.1.19.2,Alphanumeric Literals} +@newsubsubsection{Alphanumeric Literals} An alphanumeric literal @idx{Literals (Alphanumeric)} @@ -1164,7 +1164,7 @@ Numeric literals may be split across lines just as alphanumeric literals are, us @comment ********************************************************************* @comment ** 2.1.19.3 Figurative Constants ** @comment ********************************************************************* -@newunit{2.1.19.3,Figurative Constants} +@newsubsubsection{Figurative Constants} Figurative constants are reserved words that may be used as literals anywhere the figurative constants value could be interpreted as an arbitrarily long sequence of the characters in question. When a specific length is required, such as would be the case with an argument to a subprogram, a figurative constant may not be used. Thus, the following are valid uses of figurative constants: @example @@ -1206,7 +1206,7 @@ Programmers may create their own figurative constants via the @syntaxrefalt{SYMB @comment ********************************************************************* @comment ** 2.1.20 Punctuation ** @comment ********************************************************************* -@newsubsection{2.1.20,Punctuation} +@newsubsection{Punctuation} A comma (@samp{,}) @idx{, (Punctuation)} @idx{; (Punctuation)} @@ -1224,7 +1224,7 @@ The rules for where and when periods are needed in the procedure division are so @comment ********************************************************************* @comment ** 2.1.21 Interfacing to Other Environments ** @comment ********************************************************************* -@newsubsection{2.1.21,Interfacing to Other Environments} +@newsubsection{Interfacing to Other Environments} Through the @statement{CALL}, COBOL programs may invoke other COBOL programs serving as subprograms. This is quite similar to cross-program linkage capabilities provided by other languages. In GnuCOBOL's case, the @code{CALL} facility is powerful enough to be tailored to the point where a GnuCOBOL program can communicate with operating system, database management and run-time library APIs, even if they weren't written in COBOL themselves. @xref{GnuCOBOL Main Programs CALLing C Subprograms}, for an example of how a GnuCOBOL program could invoke a C-language subprogram, passing information back and forth between the two. @@ -1233,11 +1233,7 @@ The fact that GnuCOBOL supports a full-featured two-way interface with C-languag @comment ** 2.2 The COBOL Language - Advanced Techniques ** @comment ********************************************************************* @page -@newsection{2.2,The COBOL Language - Advanced Techniques} -@comment ********************************************************************* -@comment ** 2.2.1 Table References ** -@comment ********************************************************************* -@newsubsection{2.2.1,Table References} +@newsection{Table References} COBOL uses parenthesis to specify the subscripts used to reference table entries (tables in COBOL are what other programming languages refer to as arrays). For example, observe the following data structure which defines a 4 column by 3 row grid of characters: @@ -1266,7 +1262,7 @@ In the above examples, a comma is used as a separator character between the two @comment ** 2.2.2 Qualification of Data Names ** @comment ********************************************************************* @page -@newsubsection{2.2.2,Qualification of Data Names} +@newsubsection{Qualification of Data Names} COBOL allows data names to be duplicated within a program, provided references to those data names may be made in such a manner as to make those references unique through a process known as qualification. To see qualification at work, observe the following segments of two data records defined in a COBOL program: @@ -1296,7 +1292,7 @@ The reserved word @code{IN} may be used in lieu of @code{OF}. @comment ** 2.2.3 Reference Modifiers ** @comment ********************************************************************* @page -@newsubsection{2.2.3,Reference Modifiers} +@newsubsection{Reference Modifiers} @diagram{Reference Modifier (Format 1),PD-Ref-Mod-1,PD-Ref-Mod-1,None} @diagram{Reference Modifier (Format 2),PD-Ref-Mod-2,PD-Ref-Mod-2,None} @@ -1331,7 +1327,7 @@ Reference modification may be used anywhere an identifier is legal, including se @comment ** 2.2.4 Arithmetic Expressions ** @comment ********************************************************************* @page -@newsubsection{2.2.4,Arithmetic Expressions} +@newsubsection{Arithmetic Expressions} @diagram{Arithmetic-Expression,PD-Arith-Expr,PD-Arith-Expr,None} @diagram{Unary-Expression,PD-Unary-Expr,PD-Unary-Expr,None} @@ -1428,14 +1424,14 @@ Of course, arithmetic expression operands may be numeric data items (any USAGE e @comment ** 2.2.5 Conditional Expressions ** @comment ********************************************************************* @page -@newsubsection{2.2.5,Conditional Expressions} +@newsubsection{Conditional Expressions} Conditional expressions are expressions which identify the circumstances under which a program may take an action or cease taking an action. As such, conditional expressions produce a value of @code{TRUE} or @code{FALSE}. There are seven types of conditional expressions, as discussed in the following sections. @comment ********************************************************************* @comment ** 2.2.5.1 Condition Names ** @comment ********************************************************************* -@newsubsection{2.2.5.1,Condition Names} +@newsubsection{Condition Names} These are the simplest of all conditions. Observe the following code: @example @@ -1472,7 +1468,7 @@ IF XL @comment ** 2.2.5.2 Class Conditions ** @comment ********************************************************************* @page -@newsubsection{2.2.5.2,Class Conditions} +@newsubsection{Class Conditions} @diagram{Class-Condition,PD-Class-Cond,PD-Class-Cond,None} Class conditions evaluate the type of data that is currently stored in a data item. @@ -1520,7 +1516,7 @@ Now observe the following code, which will execute the @code{150-Process-Hex-Val @comment ** 2.2.5.3 Sign Conditions ** @comment ********************************************************************* @page -@newsubsection{2.2.5.3,Sign Conditions} +@newsubsection{Sign Conditions} @diagram{Sign-Condition,PD-Sign-Cond,PD-Sign-Cond,None} Sign conditions evaluate the numeric state of a data item defined with a @syntaxref{PICTURE} and/or @syntaxref{USAGE} that supports numeric values. @@ -1538,7 +1534,7 @@ The @code{NOT} option reverses the @code{TRUE}/@code{FALSE} value of the conditi @comment ** 2.2.5.4 Switch-Status Conditions ** @comment ********************************************************************* @page -@newsubsection{2.2.5.4,Switch-Status Conditions} +@newsubsection{Switch-Status Conditions} In the @code{SPECIAL-NAMES} paragraph, an external switch name can be associated with one or more condition names. These condition names may then be used to test the ON/OFF status of the external switch. Here are the relevant sections of code in a program named @file{testprog}, which is designed to simply announce if @code{SWITCH-1} is on: @@ -1570,7 +1566,7 @@ $ @comment ** 2.2.5.5 Relation Conditions ** @comment ********************************************************************* @page -@newsubsection{2.2.5.5,Relation Conditions} +@newsubsection{Relation Conditions} @diagram{Relation-Condition,PD-Rel-Cond,PD-Rel-Cond,None} @diagram{RelOp,PD-RelOp,PD-RelOp,None} @@ -1592,7 +1588,7 @@ There is no functional difference between using the wordy version (@code{IS EQUA @comment ** 2.2.5.6 Combined Conditions ** @comment ********************************************************************* @page -@newsubsection{2.2.5.6,Combined Conditions} +@newsubsection{Combined Conditions} @diagram{Combined Condition,PD-Comb-Cond,PD-Comb-Cond,None} A combined condition is one that computes a @code{TRUE}/@code{FALSE} value from the @code{TRUE}/@code{FALSE} values of two other conditions (which could themselves be combined conditions). @@ -1633,7 +1629,7 @@ Evaluates to @code{FALSE} @comment ** 2.2.5.7 Negated Conditions ** @comment ********************************************************************* @page -@newsubsection{2.2.5.7,Negated Conditions} +@newsubsection{Negated Conditions} @diagram{Negated Condition,PD-Neg-Cond,PD-Neg-Cond,None} A condition may be negated by prefixing it with the @@ -1659,7 +1655,7 @@ Evaluates to @code{FALSE AND (FALSE AND TRUE)} which evaluates to @code{FALSE} @comment ** 2.2.6 Use of Periods ** @comment ********************************************************************* @page -@newsubsection{2.2.6,Use of Periods} +@newsubsection{Use of Periods} All COBOL implementations distinguish between sentences and statements in the procedure division. A @define{Statement} is a single executable COBOL instruction. For example, these are all statements: @@ -1710,7 +1706,7 @@ See the period at the end of the second @syntaxref{MULTIPLY}? That is what term @comment ** 2.2.7 Use of VERB/END-VERB Constructs ** @comment ********************************************************************* @page -@newsubsection{2.2.7,Use of VERB/END-VERB Constructs} +@newsubsection{Use of VERB/END-VERB Constructs} Prior to the 1985 COBOL standard, using a period character was the only way to signal the end of a statement's scope. Unfortunately, this caused some problems. Take a look at this code: @@ -1785,14 +1781,14 @@ If you will be porting existing code over to GnuCOBOL, you'll find it an accommo @comment ** 2.2.8 Concurrent Access to Files ** @comment ********************************************************************* @page -@newsubsection{2.2.8,Concurrent Access to Files} +@newsubsection{Concurrent Access to Files} The manipulation of data files is one of the COBOL language's great strengths. There are features built into COBOL to deal with the possibility that multiple programs may be attempting to access the same file concurrently. Multiple program concurrent access is dealt with in two ways --- file sharing and record locking. Not all GnuCOBOL implementations support file sharing and record-locking options. Whether they do or not depends upon the operating system they were built for and the build options that were used when the specific GnuCOBOL implementation was generated. @comment ********************************************************************* @comment ** 2.2.8.1 File Sharing ** @comment ********************************************************************* -@newsubsection{2.2.8.1,File Sharing} +@newsubsection{File Sharing} GnuCOBOL controls concurrent-file access at the highest level through the concept of file sharing, enforced when a program attempts to open a file. This is accomplished via a UNIX operating-system routine called @code{fcntl}. That module is not currently supported by Windows and is not present in the MinGW Unix-emulation package. GnuCOBOL builds created using a MinGW environment will be incapable of supporting file-sharing controls --- files will always be shared in such environments. A GnuCOBOL build created using the Cygwin environment on Windows @i{would} have access to @code{fcntl} and therefore @i{will} support file sharing. Of course, actual Unix builds of GnuCOBOL, as well as OSX builds, should have no issues because @code{fcntl} should be available. Any limitations imposed on a successful @syntaxref{OPEN} will remain in place until your program either issues a @syntaxref{CLOSE} against the file or the program terminates. @@ -1826,7 +1822,7 @@ If the @code{SELECT} of a file is coded with a @code{FILE STATUS} clause, @code{ @comment ** 2.2.8.2 Record Locking ** @comment ********************************************************************* @page -@newsubsection{2.2.8.2,Record Locking} +@newsubsection{Record Locking} Record-locking is supported by advanced file-management software built-in to the GnuCOBOL implementation you are using. This software provides a single point-of-control for access to files --- usually @code{ORGANIZATION INDEXED} files. One such runtime package capable of doing this is the Berkeley Database (BDB) package --- a package frequently used in GnuCOBOL builds to support indexed files. The various I/O statements your program can execute are capable of imposing limitations on access by other concurrently-executing programs to the file record they just accessed. These limitations are syntactically imposed by placing a lock on the record using a @code{LOCK} clause. Other records in the file remain available, assuming that file-sharing limitations imposed at the time the file was opened didn't prevent access to the entire file. diff --git a/guide/3.texi b/guide/3.texi index 6ad4d9d..e3c4deb 100644 --- a/guide/3.texi +++ b/guide/3.texi @@ -1,7 +1,7 @@ @comment ********************************************************************* @comment ** 3. Compiler Directing Facility ** @comment ********************************************************************* -@newchapter{3,CDF - Compiler Directing Facility} +@newchapter{CDF - Compiler Directing Facility} The Compiler Directing Facility, or CDF, is a means of controlling the compilation of GnuCOBOL programs. CDF provides a mechanism for dynamically setting or resetting certain compiler switches, introducing new source code from one or more source code libraries, making dynamic source code modifications and conditionally processing or ignoring source statements altogether. This is accomplished via a series of special CDF statements and directives that will appear in the program source code. When the compiler is operating in Fixed Format Mode, all CDF statements must begin in column seven (7) or beyond. @@ -16,26 +16,26 @@ Compiler directives are @i{never} terminated with a period. The compiler command-line option @option{-D} offers additional control (@pxref{cobc - The GnuCOBOL Compiler}). @menu -* 3.1 : >>CALL-CONVENTION. -* 3.2 : COPY. -* 3.3 : REPLACE. -* 3.4 : >>DEFINE. -* 3.5 : >>IF. -* 3.6 : >>SET. -* 3.7 : >>SOURCE. -* 3.8 : >>TURN. -* 3.9 : >>D. -* 3.10: >>DISPLAY. -* 3.11: >>PAGE. -* 3.12: >>LISTING. -* 3.13: >>LEAP-SECONDS. -* 3.14: $ Directives. +* >>CALL-CONVENTION. +* COPY. +* REPLACE. +* >>DEFINE. +* >>IF. +* >>SET. +* >>SOURCE. +* >>TURN. +* >>D. +* >>DISPLAY. +* >>PAGE. +* >>LISTING. +* >>LEAP-SECONDS. +* $ Directives. @end menu @comment ********************************************************************* @comment ** 3.1 >>CALL-CONVENTION ** @comment ********************************************************************* @page -@newsection{3.1,>>CALL-CONVENTION} +@newsection{>>CALL-CONVENTION} @diagram{CDF >>CALL-CONVENTION,CDF-CALL,CDF-CALL,None} This directive instructs the compiler how to treat references to program names and may be used to determine other details for interacting with a function or program. There are four options with COBOL being the default. @table @code @@ -58,7 +58,7 @@ Causes the linkage to the subroutine to be performed in such a way as to require @comment ** 3.2 COPY ** @comment ********************************************************************* @page -@newsection{3.2,COPY} +@newsection{COPY} @diagram{CDF COPY Statement,CDF-COPY,CDF-COPY,None} @diagram{CDF COPY Phrase-Clause,CDF-COPY-Phrase,CDF-COPY-Phrase,None} @diagram{CDF COPY String-Clause,CDF-COPY-String,CDF-COPY-String,None} @@ -124,7 +124,7 @@ Using this, you may replace character sequences that occur at the beginning (see @comment ** 3.3 REPLACE ** @comment ********************************************************************* @page -@newsection{3.3,REPLACE} +@newsection{REPLACE} @diagram{CDF REPLACE Statement (Format 1),CDF-REPLACE-1,CDF-REPLACE-1,None} @diagram{CDF REPLACE Statement (Format 2),CDF-REPLACE-2,CDF-REPLACE-2,None} @diagram{CDF REPLACE Phrase-Clause,CDF-REPLACE-Phrase,CDF-REPLACE-Phrase,None} @@ -198,7 +198,7 @@ If Replace Mode is currently active, a @code{REPLACE LAST OFF.} will replace the @comment ** 3.4 >>DEFINE Directive ** @comment ********************************************************************* @page -@newsection{3.4,>>DEFINE} +@newsection{>>DEFINE} @diagram{CDF >>DEFINE Directive,CDF-DEFINE,CDF-DEFINE,None} Use the @directive{>>DEFINE} to create CDF variables and (optionally) assign them either literal or environment variable values. @enumerate @@ -231,7 +231,7 @@ In the absence of the @comment ** 3.5 >>IF Directive ** @comment ********************************************************************* @page -@newsection{3.5,>>IF} +@newsection{>>IF} @diagram{CDF >>IF Directive,CDF-IF,CDF-IF,None} @diagram{CDF-Conditional-Expression,CDF-Cond-Expr,CDF-Cond-Expr,None} @diagram{CDF-RelOp,CDF-RelOp,CDF-RelOp,None} @@ -292,7 +292,7 @@ The @code{<>} symbol stands for @code{NOT EQUAL TO}. @comment ** 3.6 >>SET Directive ** @comment ********************************************************************* @page -@newsection{3.6,>>SET} +@newsection{>>SET} @diagram{CDF >>SET Directive,CDF-SET,CDF-SET,None} The @directive{>>SET} provides an alternate means of performing the actions of the @code{>>DEFINE} and @code{>>SOURCE} directives, as well as a means of controlling the compiler's @switchidx{-free}, @@ -366,7 +366,7 @@ The remaining options of the @directive{>>SET} provide equivalent functionality @comment ** 3.7 >>SOURCE Directive ** @comment ********************************************************************* @page -@newsection{3.7,>>SOURCE} +@newsection{>>SOURCE} @diagram{CDF >>SOURCE Directive,CDF-SOURCE,CDF-SOURCE,None} The @directive{>>SOURCE} puts the compiler into @code{FIXED} or @code{FREE} source-code format mode. This, in effect, provides yet another mechanism for controlling the compiler's @switchidx{-free} and @@ -419,28 +419,28 @@ If the compiler is already in the specified mode, this statement will have no ef @comment ** 3.8 >>TURN Directive ** @comment ********************************************************************* @page -@newsection{3.8,>>TURN} +@newsection{>>TURN} @diagram{CDF >>TURN Directive,CDF-TURN,CDF-TURN,None} The directive will (de-)activate exception checks. @comment ******************************************************************** @comment ** 3.9 >>D Directive ** @comment ******************************************************************** @page -@newsection{3.9,>>D} +@newsection{>>D} @diagram{CDF >>D Directive,CDF-DEBUG,CDF-DEBUG,None} The directive removes all floating debug lines if debug mode not active. Otherwise will ignore the directive part of the line. @comment ******************************************************************** @comment ** 3.10 >>>DISPLAY Directive ** @comment ******************************************************************** @page -@newsection{3.10,>>DISPLAY} +@newsection{>>DISPLAY} @diagram{CDF >>DISPLAY Directive,CDF-DISPLAY,CDF-DISPLAY,None} The directive is a v1.0 extension and will display messages during compilation. @comment ******************************************************************** @comment ** 3.11 >>PAGE Directive ** @comment ******************************************************************** @page -@newsection{3.11,>>PAGE} +@newsection{>>PAGE} @diagram{CDF >>PAGE Directive,CDF-PAGE,CDF-PAGE,None} The PAGE directive specifies page ejection and provides documentation for the source listing. @enumerate @@ -457,21 +457,21 @@ If a listing is not being produced the directive will have no effect. @comment ** 3.12 >>LISTING Directive ** @comment ******************************************************************** @page -@newsection{3.12,>>LISTING} +@newsection{>>LISTING} @diagram{CDF >>LISTING Directive,CDF-LISTING,CDF-LISTING,None} The directive allows the program listing to be de-(activated). @comment ******************************************************************** @comment ** 3.13 >>LEAP-SECONDS Directive ** @comment ******************************************************************** @page -@newsection{3.13,>>LEAP-SECONDS} +@newsection{>>LEAP-SECONDS} @diagram{CDF >>LEAP-SECONDS Directive,CDF-LEAP,CDF-LEAP,CDF-LEAP} Allows for more than 60 seconds per minute. @comment ******************************************************************** @comment ** 3.14 $ Directives ** @comment ******************************************************************** @page -@newsection{3.14,$ Directives} +@newsection{$ Directives} @diagram{CDF $ Directive,CDF-DOLLAR,CDF-DOLLAR,None} Offers support for MF Compiler Directives. @iftex diff --git a/guide/4.texi b/guide/4.texi index f5f0bf3..e3e03b0 100644 --- a/guide/4.texi +++ b/guide/4.texi @@ -1,7 +1,7 @@ @comment ********************************************************************* @comment ** 4. IDENTIFICATION DIVISION ** @comment ********************************************************************* -@newchapter{4,IDENTIFICATION DIVISION} +@newchapter{IDENTIFICATION DIVISION} @diagram{IDENTIFICATION DIVISION,ID-Overview,ID-Overview,ID-Overview} @diagram{PROGRAM-ID Type Clause,ID-PROGRAM-ID-Type,ID-PROGRAM-ID-Type,None} The identification division provides basic identification of the program by giving it a name and optionally defining some high-level characteristics via the eight pre-defined paragraphs that may be specified. diff --git a/guide/5.texi b/guide/5.texi index 8bfc4b6..0d1a5cd 100644 --- a/guide/5.texi +++ b/guide/5.texi @@ -1,7 +1,7 @@ @comment ********************************************************************* @comment ** 5. ENVIRONMENT DIVISION ** @comment ********************************************************************* -@newchapter{5,ENVIRONMENT DIVISION} +@newchapter{ENVIRONMENT DIVISION} @diagram{ENVIRONMENT DIVISION,ED-Overview,ED-Overview,None} This division defines the external computer environment in which the program will be operating. This includes defining any files that the program may be . @itemize @bullet @@ -27,7 +27,7 @@ If none of the sections within the environment division are coded, the @code{ENV @comment ** 5.1 CONFIGURATION SECTION ** @comment ********************************************************************* @page -@newsection{5.1,CONFIGURATION SECTION} +@newsection{CONFIGURATION SECTION} @diagram{CONFIGURATION SECTION,ED-CONFIG-SECTION,ED-CONFIG-SECTION,None} This section defines the computer system upon which the program is being compiled and executed and also specifies any special environmental configuration or compatibility characteristics. @enumerate @@ -44,7 +44,7 @@ If none of the features provided by the configuration section are required by a @comment ** 5.1.1 SOURCE-COMPUTER ** @comment ********************************************************************* @page -@newsubsection{5.1.1,SOURCE-COMPUTER} +@newsubsection{SOURCE-COMPUTER} @diagram{SOURCE-COMPUTER,ED-SOURCE-COMPUTER,ED-SOURCE-COMPUTER,None} This paragraph defines the computer upon which the program is being compiled and provides one way in which debugging code embedded within the program may be activated. @enumerate @@ -69,7 +69,7 @@ Even without the @code{DEBUGGING MODE} clause, it is still possible to compile d @comment ** 5.1.2 OBJECT-COMPUTER ** @comment ********************************************************************* @page -@newsubsection{5.1.2,OBJECT-COMPUTER} +@newsubsection{OBJECT-COMPUTER} @diagram{OBJECT-COMPUTER,ED-OBJECT-COMPUTER,ED-OBJECT-COMPUTER,ED-OBJECT-COMPUTER} This paragraph describes the computer upon which the program will execute. @enumerate @@ -118,7 +118,7 @@ Absence of a @code{CLASSIFICATION} clause will cause character classification to @comment ** 5.1.3 SPECIAL-NAMES ** @comment ********************************************************************* @page -@newsubsection{5.1.3,SPECIAL-NAMES} +@newsubsection{SPECIAL-NAMES} @diagram{SPECIAL-NAMES,ED-SPECIAL-NAMES-Info,ED-SPECIAL-NAMES-TeX,ED-SPECIAL-NAMES} @center @var{Alphabet-Name-Clause}, @var{Class-Definition-Clause}, @center @var{Switch-Definition-Clause} and @var{Symbolic-Characters-Clause} @@ -287,7 +287,7 @@ The @code{CSP} positioning option stands for ``No Spacing''. Testing on a MinGW @comment ** 5.1.3.1 Alphabet-Name-Clause ** @comment ********************************************************************* @page -@newunit{5.1.3.1,Alphabet-Name-Clause} +@newsubsubsection{Alphabet-Name-Clause} @diagram{SPECIAL-NAMES Alphabet-Clause,ED-SPECIAL-NAMES-AN-Info,ED-SPECIAL-NAMES-AN-TeX,None} @diagram{SPECIAL-NAMES ALPHABET Literal-Clause,ED-SPECIAL-NAMES-L-Info,ED-SPECIAL-NAMES-L-TeX,None} The @@ -329,7 +329,7 @@ You may specify any of the figurative constants @code{SPACE}, @code{SPACES}, @co @comment ** 5.1.3.2 Class-Definition-Clause ** @comment ********************************************************************* @page -@newunit{5.1.3.2,Class-Definition-Clause} +@newsubsubsection{Class-Definition-Clause} @diagram{SPECIAL-NAMES Class-Definition-Clause,ED-SPECIAL-NAMES-CD,ED-SPECIAL-NAMES-CD,None} @enumerate @item @@ -360,7 +360,7 @@ Once class @code{Hexadecimal} has been defined, program code could then use a st @comment ** 5.1.3.3 Switch-Definition-Clause ** @comment ********************************************************************* @page -@newunit{5.1.3.3,Switch-Definition-Clause} +@newsubsubsection{Switch-Definition-Clause} @diagram{SPECIAL-NAMES Switch-Definition-Clause,ED-SPECIAL-NAMES-SD,ED-SPECIAL-NAMES-SD,None} The switch-definition clause associates a condition-name with a run-time execution switch so that the status of that switch may be tested from within a program. @enumerate @@ -395,7 +395,7 @@ The @comment ** 5.1.3.4 Symbolic-Characters-Clause ** @comment ********************************************************************* @page -@newunit{5.1.3.4,Symbolic-Characters-Clause} +@newsubsubsection{Symbolic-Characters-Clause} @diagram{SPECIAL-NAMES-Symbolic-Characters-Clause,ED-SPECIAL-NAMES-SC,ED-SPECIAL-NAMES-SC,None} This clause may be used to define your own figurative constants. @enumerate @@ -442,7 +442,7 @@ SYMBOLIC CHARACTERS NUL SOH BEL DC1 DC2 @comment ** 5.1.4 REPOSITORY ** @comment ********************************************************************* @page -@newsubsection{5.1.4,REPOSITORY} +@newsubsection{REPOSITORY} @diagram{REPOSITORY,ED-REPOSITORY,ED-REPOSITORY,None} The REPOSITORY paragraph provides a way to control access to the various built-in intrinsic functions and any user defined functions that your program will be using. @enumerate @@ -490,7 +490,7 @@ REPOSITORY. @comment ** 5.2 INPUT-OUTPUT SECTION ** @comment ********************************************************************* @page -@newsection{5.2,INPUT-OUTPUT SECTION} +@newsection{INPUT-OUTPUT SECTION} @diagram{INPUT-OUTPUT SECTION,ED-IO-SECTION,ED-IO-SECTION,None} The @code{INPUT-OUTPUT} section provides for the definition of any files the program will be accessing as well as control of the I/O buffering process against those files through the @code{FILE-CONTROL} and @code{I-O-CONTROL} paragraphs, respectively. @enumerate @@ -511,7 +511,7 @@ If both statement types are coded in the @code{I-O-CONTROL} paragraph, the order @comment ** 5.2.1 SELECT Statement ** @comment ********************************************************************* @page -@newsubsection{5.2.1,SELECT} +@newsubsection{SELECT} @diagram{SELECT Statement,ED-SELECT,ED-SELECT,ED-SELECT} The @statement{SELECT} creates a definition of a file and links that COBOL definition to the external operating system environment. @enumerate @@ -870,7 +870,7 @@ ACCESS MODE IS SEQUENTIAL @comment ** 5.2.1.1 ORGANIZATION SEQUENTIAL ** @comment ********************************************************************* @page -@newunit{5.2.1.1,ORGANIZATION SEQUENTIAL} +@newsubsubsection{ORGANIZATION SEQUENTIAL} @diagram{ORGANIZATION SEQUENTIAL Clause,ED-SELECT-ORG-SEQ,ED-SELECT-ORG-SEQ,None} Files declared as @code{ORGANIZATION SEQUENTIAL} will consist of records with no explicit end-of-record delimiter character sequences; records in such files are ``delineated'' by a calculated byte-offset (based on the maximum record length) into the file. @enumerate @@ -934,7 +934,7 @@ Sequential files are processed using the following statements: @comment ** 5.2.1.2 ORGANIZATION LINE SEQUENTIAL ** @comment ********************************************************************* @page -@newunit{5.2.1.2,ORGANIZATION LINE SEQUENTIAL} +@newsubsubsection{ORGANIZATION LINE SEQUENTIAL} @diagram{ORGANIZATION LINE SEQUENTIAL Clause,ED-SELECT-ORG-L-SEQ,ED-SELECT-ORG-L-SEQ,ED-SELECT-ORG-L-SEQ} Files declared as @code{ORGANIZATION LINE SEQUENTIAL} will consist of records terminated by an end-of-record delimiter character or character sequence. @enumerate @@ -1007,7 +1007,7 @@ Line Sequential files are processed using the following statements: @comment ** 5.2.1.3 ORGANIZATION RELATIVE ** @comment ********************************************************************* @page -@newunit{5.2.1.3,ORGANIZATION RELATIVE} +@newsubsubsection{ORGANIZATION RELATIVE} @diagram{ORGANIZATION RELATIVE Clause,ED-SELECT-ORG-REL,ED-SELECT-ORG-REL,None} These files are files with an internal organization such that records may be processed in a sequential manner based upon their physical location in the file or in a random manner by allowing records to be read, written or updated by specifying the relative record number in the file. @enumerate @@ -1084,7 +1084,7 @@ Relative files are processed using the following statements: @comment ** 5.2.1.4 ORGANIZATION INDEXED ** @comment ********************************************************************* @page -@newunit{5.2.1.4,ORGANIZATION INDEXED} +@newsubsubsection{ORGANIZATION INDEXED} @diagram{ORGANIZATION INDEXED Clause,ED-SELECT-ORG-IDX,ED-SELECT-ORG-IDX,None} Indexed files, like relative files, may have their records processed in either a sequential or random manner. Unlike relative files, however, the actual location of a record in an indexed file is calculated automatically based upon the value(s) of one or more alphanumeric fields within records of the file. For example, an indexed file containing product data might use the product identification code as a record key. This means you may read, write or update the @code{A6G4328}@sup{th} record or the @code{Z8X7723}@sup{th} record directly, based upon the product id value of those records! @enumerate @@ -1168,7 +1168,7 @@ Indexed files are processed using the following statements: @comment ** 5.2.2 SAME RECORD AREA Statement ** @comment ********************************************************************* @page -@newsubsection{5.2.2,SAME RECORD AREA} +@newsubsection{SAME RECORD AREA} @diagram{I-O-CONTROL SAME AREA,ED-IO-CONTROL-SAME,ED-IO-CONTROL-SAME,ED-IO-CONTROL-SAME} The @code{SAME RECORD AREA} clause allows you to specify that multiple files should share the same input and output memory buffers. @enumerate @@ -1188,7 +1188,7 @@ The effect of this statement will be to cause the specified files to share the s @comment ** 5.2.3 MULTIPLE FILE Statement ** @comment ********************************************************************* @page -@newsubsection{5.2.3,MULTIPLE FILE} +@newsubsection{MULTIPLE FILE} @diagram{I-O-CONTROL MULTIPLE FILE,ED-IO-CONTROL-MULT,ED-IO-CONTROL-MULT,ED-IO-CONTROL-MULT} @iftex @sp 3 diff --git a/guide/6.texi b/guide/6.texi index d7531b0..da1e96c 100644 --- a/guide/6.texi +++ b/guide/6.texi @@ -1,7 +1,7 @@ @comment ********************************************************************* @comment ** 6. DATA DIVISION ** @comment ********************************************************************* -@newchapter{6,DATA DIVISION} +@newchapter{DATA DIVISION} @diagram{DATA DIVISION,DD-Overview-Info,DD-Overview-TeX,None} All data used by any COBOL program must be defined in one of the six sections of the data division, depending upon the purpose of the data. @@ -16,35 +16,35 @@ If no data division sections are needed, the @code{DATA DIVISION.} header itself If more than one section is needed in the data division (a common situation), the sections must be coded in the sequence they are presented above. @end enumerate @menu -* 6.1: Data Definition Principles. -* 6.2: FILE SECTION. +* Data Definition Principles. +* FILE SECTION. @detailmenu -* 6.2.1: File/Sort-Description. -* 6.2.2: FILE-SECTION-Data-Item. +* File/Sort-Description. +* FILE-SECTION-Data-Item. @end detailmenu -* 6.3: WORKING-STORAGE SECTION. -* 6.4: LOCAL-STORAGE SECTION. -* 6.5: LINKAGE SECTION. -* 6.6: REPORT SECTION. +* WORKING-STORAGE SECTION. +* LOCAL-STORAGE SECTION. +* LINKAGE SECTION. +* REPORT SECTION. @detailmenu -* 6.6.1: Report Group Definitions. -* 6.6.2: REPORT SECTION Data Items. +* Report Group Definitions. +* REPORT SECTION Data Items. @end detailmenu -* 6.7: SCREEN SECTION. -* 6.8: Special Data Items. +* SCREEN SECTION. +* Special Data Items. @detailmenu -* 6.8.1: 01-Level Constants. -* 6.8.2: 66-Level Data Items. -* 6.8.3: 77-Level Data Items. -* 6.8.4: 78-Level Data Items. -* 6.8.5: 88-Level Data Items. +* 01-Level Constants. +* 66-Level Data Items. +* 77-Level Data Items. +* 78-Level Data Items. +* 88-Level Data Items. @end detailmenu -* 6.9: Data Description Clauses. +* Data Description Clauses. @end menu @comment ********************************************************************* @comment ** 6.1 Data Definition Principles ** @comment ********************************************************************* -@newsection{6.1,Data Definition Principles} +@newsection{Data Definition Principles} GnuCOBOL data items, like those of other COBOL implementations, are described in a hierarchical manner. This accommodates the fact that data items frequently need to be able to be broken up into subordinate items. Take for example, the following logical layout of a portion of a data item named @code{Employee}: @iftex @@ -116,21 +116,21 @@ When group items are being defined, subordinate items may be assigned the ``name @comment ** 6.2 FILE SECTION ** @comment ********************************************************************* @page -@newsection{6.2,FILE SECTION} +@newsection{FILE SECTION} @diagram{FILE SECTION,DD-FILE-SECTION,DD-FILE-SECTION,None} Every file that has been referenced by a @statementref{SELECT} must also be described in the file section of the data division. Files destined for use as sort/merge work files must be described with a Sort/Merge File Description (@code{SD}) while every other file is described with a File Description (@code{FD}). Each of these descriptions will almost always be followed with at least one record description. @menu -* 6.2.1: File/Sort-Description. -* 6.2.2: FILE-SECTION-Data-Item. +* File/Sort-Description. +* FILE-SECTION-Data-Item. @end menu @comment ********************************************************************* @comment ** 6.2.1 File/Sort-Description ** @comment ********************************************************************* @page -@newsubsection{6.2.1,File/Sort-Description} +@newsubsection{File/Sort-Description} @diagram{File/Sort-Description,DD-FD-SD,DD-FD-SD,DD-FD-SD} @enumerate @item @@ -238,7 +238,7 @@ If you specify a specific filename in the sort/merge work file's @code{SELECT}, @comment ** 6.2.2 FILE-SECTION-Data-Item ** @comment ********************************************************************* @page -@newsubsection{6.2.2,FILE-SECTION-Data-Item} +@newsubsection{FILE-SECTION-Data-Item} @diagram{FILE-SECTION-Data-Item,DD-FS-Data-Item,DD-FS-Data-Item,DD-SYNC-LEFT-RIGHT} Every sort file description (@code{SD} or @code{FD}) must be followed by at least one 01-level data item, except for file descriptions containing the @code{REPORT IS} clause. These 01-level data items, in turn, may be broken down into subordinate group and elementary items. An 01-level data item defined here in the file section is also known as a @@ -295,7 +295,7 @@ File section data buffers (and therefore all 01-level record layouts defined in @comment ** 6.3 WORKING-STORAGE SECTION ** @comment ********************************************************************* @page -@newsection{6.3,WORKING-STORAGE SECTION} +@newsection{WORKING-STORAGE SECTION} @diagram{WORKING-STORAGE-SECTION-Data-Item,DD-WSS-Data-Item,DD-WSS-Data-Item,DD-SYNC-LEFT-RIGHT} The working-storage section is used to describe data items that are not part of files, screens or reports and whose data values persist throughout the execution of the program. @@ -347,7 +347,7 @@ Data items defined within the working-storage section are automatically initiali @comment ** 6.4 LOCAL-STORAGE SECTION ** @comment ********************************************************************* @page -@newsection{6.4,LOCAL-STORAGE SECTION} +@newsection{LOCAL-STORAGE SECTION} @diagram{LOCAL-STORAGE-SECTION-Data-Item,DD-LSS-Data-Item,DD-LSS-Data-Item,DD-SYNC-LEFT-RIGHT} The local-storage section is similar to working-storage, but describes data within a subprogram that will be dynamically allocated and initialized (automatically) each time the subprogram is executed. @xref{Data Initialization}, for the rules of data initialization. @@ -396,7 +396,7 @@ Local-storage cannot be used in nested subprograms. @comment ** 6.5 LINKAGE SECTION ** @comment ********************************************************************* @page -@newsection{6.5,LINKAGE SECTION} +@newsection{LINKAGE SECTION} @diagram{LINKAGE-SECTION-Data-Item,DD-LS-Data-Item,DD-LS-Data-Item,DD-SYNC-LEFT-RIGHT} The linkage section describes data within a subprogram that serves as either input arguments to or output results from the subprogram. @@ -459,7 +459,7 @@ No storage is allocated for data defined in the linkage section; the data descri @comment ** 6.6 REPORT SECTION ** @comment ********************************************************************* @page -@newsection{6.6,REPORT SECTION} +@newsection{REPORT SECTION} @diagram{REPORT SECTION,DD-REPORT-SECTION,DD-REPORT-SECTION,None} @diagram{Report-Description (RD),DD-RS-RD,DD-RS-RD,None} @@ -623,14 +623,14 @@ References to @code{PAGE-COUNTER} in the procedure division must be qualified wi @item The @code{RD} must be followed by at least one 01-level report group definition. @end enumerate @menu -* 6.6.1: Report Group Definitions. -* 6.6.2: REPORT SECTION Data Items. +* Report Group Definitions. +* REPORT SECTION Data Items. @end menu @comment ********************************************************************* @comment ** 6.6.1 Report Group Definitions ** @comment ********************************************************************* @page -@newsubsection{6.6.1,Report Group Definitions} +@newsubsection{Report Group Definitions} @diagram{Report-Group-Definition,DD-RS-Report-Group,DD-RS-Report-Group,None} The syntax shown here documents how a report group is defined to a report. This syntax is valid only in the report section, and only then after an @code{RD}. @@ -669,7 +669,7 @@ Report group declarations must be followed by at least one @code{@var{REPORT-SEC @comment ** 6.6.2 REPORT SECTION Data Items ** @comment ********************************************************************* @page -@newsubsection{6.6.2,REPORT SECTION Data Items} +@newsubsection{REPORT SECTION Data Items} @diagram{REPORT-SECTION-Data-Item,DD-RS-Data-Item-Info,DD-RS-Data-Item-TeX,None} Data item descriptions describing the report lines and fields that make up the substance of a report group immediately follow the definition of that group. @@ -700,7 +700,7 @@ Group items (those without @comment ** 6.7 SCREEN SECTION ** @comment ********************************************************************* @page -@newsection{6.7,SCREEN SECTION} +@newsection{SCREEN SECTION} @diagram{SCREEN-SECTION-Data-Item,DD-SS-Data-Item,DD-SS-Data-Item,None} The screen section describes the screens to be displayed during terminal/console I-O. @@ -765,18 +765,18 @@ The @key{Tab} and @key{Back-Tab} (@key{Shift}-@key{Tab} on most keyboards) keys @comment ** 6.8 Special Data Items ** @comment ********************************************************************* @page -@newsection{6.8,Special Data Items} +@newsection{Special Data Items} @menu -* 6.8.1: 01-Level Constants. -* 6.8.2: 66-Level Data Items. -* 6.8.3: 77-Level Data Items. -* 6.8.4: 78-Level Data Items. -* 6.8.5: 88-Level Data Items. +* 01-Level Constants. +* 66-Level Data Items. +* 77-Level Data Items. +* 78-Level Data Items. +* 88-Level Data Items. @end menu @comment ********************************************************************* @comment ** 6.8.1 01-Level Constants ** @comment ********************************************************************* -@newsubsection{6.8.1,01-Level Constants} +@newsubsection{01-Level Constants} @diagram{01-Level-Constant,DD-01-Constant,DD-01-Constant,None} This syntax is valid in the following sections: @@ -937,7 +937,7 @@ Spot the differences between 32 and 64 bit. @comment ** 6.8.2 66-Level Data Items ** @comment ********************************************************************* @page -@newsubsection{6.8.2,66-Level Data Items} +@newsubsection{66-Level Data Items} @diagram{66-Level-Data-Item,DD-66-Data-Item,DD-66-Data-Item,None} This syntax is valid in the following sections: @@ -961,7 +961,7 @@ All @code{RENAMES} entries associated with one logical record must immediately f @comment ** 6.8.3 77-Level Data Items ** @comment ********************************************************************* @page -@newsubsection{6.8.3,77-Level Data Items} +@newsubsection{77-Level Data Items} @diagram{77-Level-Data-Item,DD-77-Data-Item,DD-77-Data-Item,DD-SYNC-LEFT-RIGHT} This syntax is valid in the following sections: @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE} @@ -984,7 +984,7 @@ New programs requiring a stand-alone elementary item should be coded to use a le @comment ** 6.8.4 78-Level Data Items ** @comment ********************************************************************* @page -@newsubsection{6.8.4,78-Level Data Items} +@newsubsection{78-Level Data Items} @diagram{78-Level-Constant,DD-78-Constant,DD-78-Constant,None} This syntax is valid in the following sections: @code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE}, @code{SCREEN} @@ -1014,7 +1014,7 @@ Constants defined in this way become undefined once an @code{END PROGRAM} or @co @comment ** 6.8.5 88-Level Data Items ** @comment ********************************************************************* @page -@newsubsection{6.8.5,88-Level Data Items} +@newsubsection{88-Level Data Items} @idx{Condition Names} @diagram{88-Level-Data-Item,DD-88-Data-Item,DD-88-Data-Item,None} This syntax is valid in the following sections: @@ -1053,77 +1053,77 @@ Executing the statement @code{SET @var{condition-name-1} TO FALSE} will cause @v @comment ** 6.9 Data Description Clauses ** @comment ********************************************************************* @page -@newsection{6.9,Data Description Clauses} +@newsection{Data Description Clauses} @menu -* 6.9.1: ANY LENGTH. -* 6.9.1B: ANY NUMERIC -* 6.9.2: AUTO. -* 6.9.3: AUTO-SKIP. -* 6.9.4: AUTOTERMINATE. -* 6.9.5: BACKGROUND-COLOR. -* 6.9.5B: BEFORE TIME. -* 6.9.6: BASED. -* 6.9.7: BEEP. -* 6.9.8: BELL. -* 6.9.9: BLANK. -* 6.9.10: BLANK WHEN ZERO. -* 6.9.11: BLINK. -* 6.9.12: COLUMN. -* 6.9.13: CONSTANT. -* 6.9.14: EMPTY-CHECK. -* 6.9.15: ERASE. -* 6.9.16: EXTERNAL. -* 6.9.17: FALSE. -* 6.9.18: FOREGROUND-COLOR. -* 6.9.19: FROM. -* 6.9.20: FULL. -* 6.9.21: GLOBAL. -* 6.9.22: GROUP INDICATE. -* 6.9.23: HIGHLIGHT. -* 6.9.24: JUSTIFIED. -* 6.9.25: LEFTLINE. -* 6.9.26: LENGTH-CHECK. -* 6.9.27: LINE. -* 6.9.27B: LOWER. -* 6.9.28: LOWLIGHT. -* 6.9.29: NEXT GROUP. -* 6.9.30: NO-ECHO. -* 6.9.30B: NO UPDATE. -* 6.9.31: OCCURS. -* 6.9.32: OVERLINE. -* 6.9.33: PICTURE. -* 6.9.34: PRESENT WHEN. -* 6.9.35: PROMPT. -* 6.9.36: PROTECTED. -* 6.9.37: REDEFINES. -* 6.9.38: RENAMES. -* 6.9.39: REQUIRED. -* 6.9.40: REVERSE-VIDEO. -* 6.9.41: SAME AS. -* 6.9.41B: SCROLL DOWN. -* 6.9.41C: SCROLL UP. -* 6.9.42: SECURE. -* 6.9.43: SIGN. -* 6.9.43B: SIZE. -* 6.9.44: SOURCE. -* 6.9.45: SUM. -* 6.9.46: SYNCHRONIZED. -* 6.9.46B: TIME OUT -* 6.9.47: TO. -* 6.9.48: TYPE. -* 6.9.49: TYPEDEF. -* 6.9.50: UNDERLINE. -* 6.9.50B: UPDATE. -* 6.9.50C: UPPER. -* 6.9.51: USAGE. -* 6.9.52: USING. -* 6.9.53: VALUE. +* ANY LENGTH. +* ANY NUMERIC +* AUTO. +* AUTO-SKIP. +* AUTOTERMINATE. +* BACKGROUND-COLOR. +* BEFORE TIME. +* BASED. +* BEEP. +* BELL. +* BLANK. +* BLANK WHEN ZERO. +* BLINK. +* COLUMN. +* CONSTANT. +* EMPTY-CHECK. +* ERASE. +* EXTERNAL. +* FALSE. +* FOREGROUND-COLOR. +* FROM. +* FULL. +* GLOBAL. +* GROUP INDICATE. +* HIGHLIGHT. +* JUSTIFIED. +* LEFTLINE. +* LENGTH-CHECK. +* LINE. +* LOWER. +* LOWLIGHT. +* NEXT GROUP. +* NO-ECHO. +* NO UPDATE. +* OCCURS. +* OVERLINE. +* PICTURE. +* PRESENT WHEN. +* PROMPT. +* PROTECTED. +* REDEFINES. +* RENAMES. +* REQUIRED. +* REVERSE-VIDEO. +* SAME AS. +* SCROLL DOWN. +* SCROLL UP. +* SECURE. +* SIGN. +* SIZE. +* SOURCE. +* SUM. +* SYNCHRONIZED. +* TIME OUT +* TO. +* TYPE. +* TYPEDEF. +* UNDERLINE. +* UPDATE. +* UPPER. +* USAGE. +* USING. +* VALUE. @end menu @comment ********************************************************************* @comment ** 6.9.1 ANY LENGTH ** @comment ********************************************************************* -@newsubsection{6.9.1,ANY LENGTH} +@newsubsection{ANY LENGTH} @diagram{ANY LENGTH Attribute,DD-ANY-LENGTH,DD-ANY-LENGTH,None} This syntax is valid in the following sections: @code{LINKAGE} @@ -1140,7 +1140,7 @@ They are determined by checking the caller's definition, which therefore MUST be @comment ** 6.9.1B ANY NUMERIC ** @comment ********************************************************************* @page -@newsubsection{6.9.1B,ANY NUMERIC} +@newsubsection{ANY NUMERIC} @diagram{ANY NUMERIC Attribute,DD-ANY-NUMERIC,DD-ANY-NUMERIC,None} This syntax is valid in the following sections: @code{LINKAGE} @@ -1159,7 +1159,7 @@ The @code{ANY NUMERIC} and @syntaxref{BASED} clauses cannot be used together in @comment ** 6.9.2 AUTO ** @comment ********************************************************************* @page -@newsubsection{6.9.2,AUTO} +@newsubsection{AUTO} @diagram{AUTO Attribute,DD-AUTO,DD-AUTO,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1173,7 +1173,7 @@ The @code{AUTO}, @syntaxref{AUTO-SKIP} and @syntaxref{AUTOTERMINATE} clauses are @comment ** 6.9.3 AUTO-SKIP ** @comment ********************************************************************* @page -@newsubsection{6.9.3,AUTO-SKIP} +@newsubsection{AUTO-SKIP} @diagram{AUTO-SKIP Attribute,DD-AUTO-SKIP,DD-AUTO-SKIP,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1187,7 +1187,7 @@ The @syntaxref{AUTO}, @code{AUTO-SKIP} and @syntaxref{AUTOTERMINATE} clauses are @comment ** 6.9.4 AUTOTERMINATE ** @comment ********************************************************************* @page -@newsubsection{6.9.4,AUTOTERMINATE} +@newsubsection{AUTOTERMINATE} @diagram{AUTOTERMINATE Attribute,DD-AUTOTERMINATE,DD-AUTOTERMINATE,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1201,7 +1201,7 @@ The @syntaxref{AUTO}, @syntaxref{AUTO-SKIP} and @code{AUTOTERMINATE} clauses are @comment ** 6.9.5 BACKGROUND-COLOR ** @comment ********************************************************************* @page -@newsubsection{6.9.5,BACKGROUND-COLOR} +@newsubsection{BACKGROUND-COLOR} @diagram{BACKGROUND-COLOR Attribute,DD-BACKGROUND-COLOR,DD-BACKGROUND-COLOR,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1235,7 +1235,7 @@ END-DISPLAY @comment ** 6.9.5B BEFORE TIME ** @comment ********************************************************************* @page -@newsubsection{6.9.5B,BEFORE TIME} +@newsubsection{BEFORE TIME} @diagram{BEFORE TIME Attribute,DD-BEFORE-TIME,DD-BEFORE-TIME,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1246,7 +1246,7 @@ This clause is used to specify time sequence etc, etc, etc. NEEDS CONTENT HERE. @comment ** 6.9.6 BASED ** @comment ********************************************************************* @page -@newsubsection{6.9.6,BASED} +@newsubsection{BASED} @diagram{BASED Attribute,DD-BASED,DD-BASED,None} This syntax is valid in the following sections: @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE} @@ -1263,7 +1263,7 @@ The @code{BASED} clause may only be used on level 01 and level 77 data items. @comment ** 6.9.7 BEEP ** @comment ********************************************************************* @page -@newsubsection{6.9.7,BEEP} +@newsubsection{BEEP} @diagram{BEEP Attribute,DD-BEEP,DD-BEEP,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1279,7 +1279,7 @@ Use this clause to cause an audible tone to occur when the screen item is @code{ @comment ** 6.9.8 BELL ** @comment ********************************************************************* @page -@newsubsection{6.9.8,BELL} +@newsubsection{BELL} @diagram{BELL Attribute,DD-BELL,DD-BELL,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1294,7 +1294,7 @@ Use this clause to cause an audible tone to occur when the screen item is @code{ @comment ** 6.9.9 BLANK ** @comment ********************************************************************* @page -@newsubsection{6.9.9,BLANK} +@newsubsection{BLANK} @diagram{BLANK Attribute,DD-BLANK,DD-BLANK,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1311,7 +1311,7 @@ This clause is useful when one screen section item is being displayed over the t @comment ** 6.9.10 BLANK WHEN ZERO ** @comment ********************************************************************* @page -@newsubsection{6.9.10,BLANK WHEN ZERO} +@newsubsection{BLANK WHEN ZERO} @diagram{BLANK-WHEN-ZERO Attribute,DD-BLANK-WHEN-ZERO,DD-BLANK-WHEN-ZERO,None} This syntax is valid in the following sections: @code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE}, @code{REPORT}, @code{SCREEN} @@ -1328,7 +1328,7 @@ This clause may only be used on a @code{PIC 9} data item with a @syntaxref{USAGE @comment ** 6.9.11 BLINK ** @comment ********************************************************************* @page -@newsubsection{6.9.11,BLINK} +@newsubsection{BLINK} @diagram{BLINK Attribute,DD-BLINK,DD-BLINK,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1342,7 +1342,7 @@ The @code{BLINK} clause modifies the visual appearance of the displayed field by @comment ** 6.9.12 COLUMN ** @comment ********************************************************************* @page -@newsubsection{6.9.12,COLUMN} +@newsubsection{COLUMN} @diagram{COLUMN (REPORT SECTION) Clause,DD-COLUMN-1,DD-COLUMN-1,None} @diagram{COLUMN (SCREEN SECTION) Clause,DD-COLUMN-2,DD-COLUMN-2,None} This syntax is valid in the following sections: @@ -1389,7 +1389,7 @@ If a screen data item's description includes the @syntaxref{FROM}, @syntaxref{TO @comment ** 6.9.13 CONSTANT ** @comment ********************************************************************* @page -@newsubsection{6.9.13,CONSTANT} +@newsubsection{CONSTANT} @diagram{CONSTANT Attribute,DD-CONSTANT,DD-CONSTANT,None} This syntax is valid in the following sections: @code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE}, @code{SCREEN} @@ -1406,7 +1406,7 @@ The value of a data item defined as a constant cannot be changed at run-time. I @comment ** 6.9.14 EMPTY-CHECK ** @comment ********************************************************************* @page -@newsubsection{6.9.14,EMPTY-CHECK} +@newsubsection{EMPTY-CHECK} @diagram{EMPTY-CHECK Attribute,DD-EMPTY-CHECK,DD-EMPTY-CHECK,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1429,7 +1429,7 @@ In order to be functional, this attribute must be supported by the underlying `` @comment ** 6.9.15 ERASE ** @comment ********************************************************************* @page -@newsubsection{6.9.15,ERASE} +@newsubsection{ERASE} @diagram{ERASE Clause,DD-ERASE,DD-ERASE,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1450,7 +1450,7 @@ This clause is useful when one screen section item is being displayed over the t @comment ** 6.9.16 EXTERNAL ** @comment ********************************************************************* @page -@newsubsection{6.9.16,EXTERNAL} +@newsubsection{EXTERNAL} @diagram{EXTERNAL Attribute,DD-EXTERNAL,DD-EXTERNAL,None} This syntax is valid in the following sections: @code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE} @@ -1480,7 +1480,7 @@ An @code{EXTERNAL} item must have a data name and that name cannot be @code{FILL @comment ** 6.9.17 FALSE ** @comment ********************************************************************* @page -@newsubsection{6.9.17,FALSE} +@newsubsection{FALSE} @diagram{FALSE Clause,DD-FALSE,DD-FALSE,None} This syntax is valid in the following sections: @code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE}, @code{REPORT}, @code{SCREEN} @@ -1497,7 +1497,7 @@ The reserved words @code{IS}, @code{SET}, @code{TO} and @code{WHEN} are optional @comment ** 6.9.18 FOREGROUND-COLOR ** @comment ********************************************************************* @page -@newsubsection{6.9.18,FOREGROUND-COLOR} +@newsubsection{FOREGROUND-COLOR} @diagram{FOREGROUND-COLOR Attribute,DD-FOREGROUND-COLOR,DD-FOREGROUND-COLOR,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1522,7 +1522,7 @@ Colors may also be specified using a numeric non-edited identifier whose value i @comment ** 6.9.19 FROM ** @comment ********************************************************************* @page -@newsubsection{6.9.19,FROM} +@newsubsection{FROM} @diagram{FROM Clause,DD-FROM,DD-FROM,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1535,7 +1535,7 @@ This clause is used to specify either the data item a screen section field is to @comment ** 6.9.20 FULL ** @comment ********************************************************************* @page -@newsubsection{6.9.20,FULL} +@newsubsection{FULL} @diagram{FULL Attribute,DD-FULL,DD-FULL,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1558,7 +1558,7 @@ In order to be functional, this attribute must be supported by the underlying `` @comment ** 6.9.21 GLOBAL ** @comment ********************************************************************* @page -@newsubsection{6.9.21,GLOBAL} +@newsubsection{GLOBAL} @diagram{GLOBAL Attribute,DD-GLOBAL,DD-GLOBAL,None} This syntax is valid in the following sections: @code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{REPORT} @@ -1588,7 +1588,7 @@ A @code{GLOBAL} item must have a data name and that name cannot be @code{FILLER} @comment ** 6.9.22 GROUP INDICATE ** @comment ********************************************************************* @page -@newsubsection{6.9.22,GROUP INDICATE} +@newsubsection{GROUP INDICATE} @diagram{GROUP-INDICATE Attribute,DD-GROUP-INDICATE,DD-GROUP-INDICATE,None} This syntax is valid in the following sections: @code{REPORT} @@ -1615,7 +1615,7 @@ On the first presentation of the detail group after any control break occurs. @comment ** 6.9.23 HIGHLIGHT ** @comment ********************************************************************* @page -@newsubsection{6.9.23,HIGHLIGHT} +@newsubsection{HIGHLIGHT} @diagram{HIGHLIGHT Attribute,DD-HIGHLIGHT,DD-HIGHLIGHT,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1631,7 +1631,7 @@ This clause, along with @syntaxref{LOWLIGHT}, are intended to provide a three-le @comment ** 6.9.24 JUSTIFIED ** @comment ********************************************************************* @page -@newsubsection{6.9.24,JUSTIFIED} +@newsubsection{JUSTIFIED} @diagram{JUSTIFIED Attribute,DD-JUSTIFIED,DD-JUSTIFIED,None} This syntax is valid in the following sections: @code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE}, @code{REPORT}, @code{SCREEN} @@ -1714,7 +1714,7 @@ MOVE 'ABCDEFGHI' TO A @comment ** 6.9.25 LEFTLINE ** @comment ********************************************************************* @page -@newsubsection{6.9.25,LEFTLINE} +@newsubsection{LEFTLINE} @diagram{LEFTLINE Attribute,DD-LEFTLINE,DD-LEFTLINE,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1736,7 +1736,7 @@ Whether or not this clause operates on Cygwin or UNIX/Linux/OSX systems will dep @comment ** 6.9.26 LENGTH-CHECK ** @comment ********************************************************************* @page -@newsubsection{6.9.26,LENGTH-CHECK} +@newsubsection{LENGTH-CHECK} @diagram{LENGTH-CHECK Attribute,DD-LENGTH-CHECK,DD-LENGTH-CHECK,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1759,7 +1759,7 @@ In order to be functional, this attribute must be supported by the underlying `` @comment ** 6.9.27 LINE ** @comment ********************************************************************* @page -@newsubsection{6.9.27,LINE} +@newsubsection{LINE} @diagram{LINE (REPORT SECTION) Clause,DD-LINE-1,DD-LINE-1,None} @diagram{LINE (SCREEN SECTION) Clause,DD-LINE-2,DD-LINE-2,None} This syntax is valid in the following sections: @@ -1814,7 +1814,7 @@ If a screen data item's description includes the @syntaxref{FROM}, @syntaxref{TO @comment ** 6.9.27B LOWER ** @comment ********************************************************************* @page -@newsubsection{6.9.27B,LOWER} +@newsubsection{LOWER} @diagram{LOWER Attribute,DD-LOWER,DD-LOWER,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1825,7 +1825,7 @@ This clause provides a means of explicitly stating that accepted data will be in @comment ** 6.9.28 LOWLIGHT ** @comment ********************************************************************* @page -@newsubsection{6.9.28,LOWLIGHT} +@newsubsection{LOWLIGHT} @diagram{LOWLIGHT Attribute,DD-LOWLIGHT,DD-LOWLIGHT,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1841,7 +1841,7 @@ This clause, along with @syntaxref{HIGHLIGHT}, are intended to provide a three-l @comment ** 6.9.29 NEXT GROUP ** @comment ********************************************************************* @page -@newsubsection{6.9.29,NEXT GROUP} +@newsubsection{NEXT GROUP} @diagram{NEXT-GROUP Clause,DD-NEXT-GROUP,DD-NEXT-GROUP,None} This syntax is valid in the following sections: @code{REPORT} @@ -1876,7 +1876,7 @@ The effects of @code{NEXT GROUP} will be in addition to any line spacing defined @comment ** 6.9.30 NO ECHO ** @comment ********************************************************************* @page -@newsubsection{6.9.30,NO-ECHO} +@newsubsection{NO-ECHO} @diagram{NO-ECHO Attribute,DD-NO-ECHO,DD-NO-ECHO,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1895,7 +1895,7 @@ This clause may only be used on a field allowing data entry (a field containing @comment ** 6.9.30B NO UPDATE ** @comment ********************************************************************* @page -@newsubsection{6.9.30B,NO UPDATE} +@newsubsection{NO UPDATE} @diagram{NO-UPDATE Attribute,DD-NO-UPDATE,DD-NO-UPDATE,None} This syntax is valid in the following sections: @code{SCREEN} @@ -1906,7 +1906,7 @@ The @code{NO UPDATE} clause forces the field to which this is applied will not b @comment ** 6.9.31 OCCURS ** @comment ********************************************************************* @page -@newsubsection{6.9.31,OCCURS} +@newsubsection{OCCURS} @diagram{OCCURS Clause,DD-OCCURS-1,DD-OCCURS-1,None} This syntax is valid in the following sections: @code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE}, @code{REPORT}, @code{SCREEN} @@ -2018,7 +2018,7 @@ And then using @code{STEP} and @code{VARYING}: @comment ** 6.9.32 OVERLINE ** @comment ********************************************************************* @page -@newsubsection{6.9.32,OVERLINE} +@newsubsection{OVERLINE} @diagram{OVERLINE Attribute,DD-OVERLINE,DD-OVERLINE,None} This syntax is valid in the following sections: @code{SCREEN} @@ -2040,7 +2040,7 @@ Whether or not this clause operates on Cygwin or UNIX/Linux/OSX systems will dep @comment ** 6.9.33 PICTURE ** @comment ********************************************************************* @page -@newsubsection{6.9.33,PICTURE} +@newsubsection{PICTURE} @diagram{PICTURE Clause,DD-PICTURE,DD-PICTURE,None} This syntax is valid in the following sections: @code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE}, @code{REPORT}, @code{SCREEN} @@ -2323,7 +2323,7 @@ Most other COBOL implementations reject the use of multiple occurrences of multi @comment ** 6.9.34 PRESENT WHEN ** @comment ********************************************************************* @page -@newsubsection{6.9.34,PRESENT WHEN} +@newsubsection{PRESENT WHEN} @diagram{PRESENT-WHEN Clause,DD-PRESENT-WHEN,DD-PRESENT-WHEN,None} This syntax is valid in the following sections: @code{REPORT} @@ -2343,7 +2343,7 @@ If the condition-name has a value of @code{TRUE}, the group will be presented. @comment ** 6.9.35 PROMPT ** @comment ********************************************************************* @page -@newsubsection{6.9.35,PROMPT} +@newsubsection{PROMPT} @diagram{PROMPT Clause,DD-PROMPT,DD-PROMPT,None} This syntax is valid in the following sections: @code{SCREEN} @@ -2365,7 +2365,7 @@ Prompt characters will be automatically transformed into spaces upon input. @comment ** 6.9.36 PROTECTED ** @comment ********************************************************************* @page -@newsubsection{6.9.36,PROTECTED} +@newsubsection{PROTECTED} @diagram{PROTECTED Attribute,DD-PROTECTED,DD-PROTECTED,None} This syntax is valid in the following sections: @code{SCREEN} @@ -2402,7 +2402,7 @@ Note that you cannot supply the @code{CONVERT} phrase in the Screen Section. Thu @comment ** 6.9.37 REDEFINES ** @comment ********************************************************************* @page -@newsubsection{6.9.37,REDEFINES} +@newsubsection{REDEFINES} @diagram{REDEFINES Clause,DD-REDEFINES,DD-REDEFINES,None} This syntax is valid in the following sections: @code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE} @@ -2438,7 +2438,7 @@ No @syntaxref{VALUE} clause may be defined on the object data item, and no data @comment ** 6.9.38 RENAMES ** @comment ********************************************************************* @page -@newsubsection{6.9.38,RENAMES} +@newsubsection{RENAMES} @diagram{RENAMES Clause,DD-RENAMES,DD-RENAMES,None} This syntax is valid in the following sections: @code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE} @@ -2461,7 +2461,7 @@ The @var{identifier-1} and @var{identifier-2} data items, along with all data it @comment ** 6.9.39 REQUIRED ** @comment ********************************************************************* @page -@newsubsection{6.9.39,REQUIRED} +@newsubsection{REQUIRED} @diagram{REQUIRED Attribute,DD-REQUIRED,DD-REQUIRED,None} This syntax is valid in the following sections: @code{SCREEN} @@ -2484,7 +2484,7 @@ In order to be functional, this attribute must be supported by the underlying `` @comment ** 6.9.40 REVERSE-VIDEO ** @comment ********************************************************************* @page -@newsubsection{6.9.40,REVERSE-VIDEO} +@newsubsection{REVERSE-VIDEO} @diagram{REVERSE-VIDEO Attribute,DD-REVERSE-VIDEO,DD-REVERSE-VIDEO,None} This syntax is valid in the following sections: @code{SCREEN} @@ -2497,7 +2497,7 @@ The @code{REVERSE-VIDEO} attribute swaps the specified or implied @syntaxref{FOR @comment ** 6.9.41 SAME AS ** @comment ********************************************************************* @page -@newsubsection{6.9.41,SAME AS} +@newsubsection{SAME AS} @diagram{SAME-AS Clause,DD-SAME-AS,DD-SAME-AS,None} The syntax is valid in the following sections: @code{WORKING-STORAGE} @@ -2564,7 +2564,7 @@ the subject of the entry is a group whose subordinate elements have the same nam @comment ** 6.9.41B SCROLL DOWN ** @comment ********************************************************************* @page -@newsubsection{6.9.41B,SCROLL DOWN} +@newsubsection{SCROLL DOWN} @diagram{SCROLL-DOWN Attribute,DD-SCROLL-DOWN,DD-SCROLL-DOWN,None} This syntax is valid in the following sections: @code{SCREEN} @@ -2574,7 +2574,7 @@ This clause will cause downward scrolling. @comment ** 6.9.41C SCROLL UP ** @comment ********************************************************************* @page -@newsubsection{6.9.41C,SCROLL UP} +@newsubsection{SCROLL UP} @diagram{SCROLL-UP Attribute,DD-SCROLL-UP,DD-SCROLL-UP,None} This syntax is valid in the following sections: @code{SCREEN} @@ -2585,7 +2585,7 @@ This clause will cause upward scrolling. MORE HERE ?? @comment ** 6.9.42 SECURE ** @comment ********************************************************************* @page -@newsubsection{6.9.42,SECURE} +@newsubsection{SECURE} @diagram{SECURE Attribute,DD-SECURE,DD-SECURE,None} This syntax is valid in the following sections: @code{SCREEN} @@ -2604,7 +2604,7 @@ This clause may only be used on a field allowing data entry (a field containing @comment ** 6.9.43 SIGN IS ** @comment ********************************************************************* @page -@newsubsection{6.9.43,SIGN IS} +@newsubsection{SIGN IS} @diagram{SIGN-IS Clause,DD-SIGN-IS,DD-SIGN-IS,None} This syntax is valid in the following sections: @code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE}, @code{REPORT}, @code{SCREEN} @@ -2647,7 +2647,7 @@ Neither the presence of an encoded digit (see above) nor an actual @samp{+} or @ @comment ** 6.9.43B SIZE ** @comment ********************************************************************* @page -@newsubsection{6.9.43B,SIZE} +@newsubsection{SIZE} @diagram{SIZE Clause,DD-SIZE,DD-SIZE,None} This syntax is valid in the following sections: @code{SCREEN} @@ -2658,7 +2658,7 @@ This clause does WHAT EXACTLY ?????? @comment ** 6.9.44 SOURCE ** @comment ********************************************************************* @page -@newsubsection{6.9.44,SOURCE} +@newsubsection{SOURCE} @diagram{SOURCE Clause,DD-SOURCE,DD-SOURCE,None} This syntax is valid in the following sections: @code{REPORT} @@ -2686,7 +2686,7 @@ The @code{ROUNDED} option comes into play should the number of digits to the rig @comment ** 6.9.45 SUM OF ** @comment ********************************************************************* @page -@newsubsection{6.9.45,SUM OF} +@newsubsection{SUM OF} @diagram{SUM-OF Clause,DD-SUM-OF-Info,DD-SUM-OF-TeX,None} This syntax is valid in the following sections: @code{REPORT} @@ -2748,7 +2748,7 @@ If, however, you want to reset the @code{SUM} counter only when the control foot @comment ** 6.9.46 SYNCHRONIZED ** @comment ********************************************************************* @page -@newsubsection{6.9.46,SYNCHRONIZED} +@newsubsection{SYNCHRONIZED} @diagram{SYNCHRONIZED,DD-SYNCHRONIZED,DD-SYNCHRONIZED,DD-SYNC-LEFT-RIGHT} This syntax is valid in the following sections: @code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE} @@ -2786,7 +2786,7 @@ The following illustrates the allocation of a group of data items both without a @comment ** 6.9.46B TIME OUT ** @comment ********************************************************************* @page -@newsubsection{6.9.46B,TIME OUT} +@newsubsection{TIME OUT} @diagram{TIME-OUT Clause,DD-TIME-OUT,DD-TIME-OUT,None} This syntax is valid in the following sections: @code{SCREEN} @@ -2798,7 +2798,7 @@ This clause will force a specific time for the data tp be entered. @comment ** 6.9.47 TO ** @comment ********************************************************************* @page -@newsubsection{6.9.47,TO} +@newsubsection{TO} @diagram{TO Clause,DD-TO,DD-TO,None} This syntax is valid in the following sections: @code{SCREEN} @@ -2815,7 +2815,7 @@ The @syntaxref{FROM}, @code{TO}, @syntaxref{USING} and @syntaxref{VALUE} clauses @comment ** 6.9.48 TYPE ** @comment ********************************************************************* @page -@newsubsection{6.9.48,TYPE} +@newsubsection{TYPE} @diagram{TYPE Clause,DD-TYPE,DD-TYPE,None} The syntax is valid in all other sections than: @code{REPORT} @@ -2993,7 +2993,7 @@ The various report groups that constitute a report may be defined in any order. @comment ** 6.9.49 TYPEDEF ** @comment ********************************************************************* @page -@newsubsection{6.9.49,TYPEDEF} +@newsubsection{TYPEDEF} @diagram{TYPEDEF Clause,DD-TYPEDEF,DD-TYPEDEF,None} This syntax is valid in the following sections FILE, WORKING-STORAGE, LOCAL-STORAGE and LINKAGE @enumerate @@ -3029,7 +3029,7 @@ In FILE SECTION, a data description entry declared at level number 1 that includ @comment ** 6.9.50 UNDERLINE ** @comment ********************************************************************* @page -@newsubsection{6.9.50,UNDERLINE} +@newsubsection{UNDERLINE} @diagram{UNDERLINE Attribute,DD-UNDERLINE,DD-UNDERLINE,None} This syntax is valid in the following sections: @code{SCREEN} @@ -3051,7 +3051,7 @@ Whether or not this clause operates on Cygwin or UNIX/Linux/OSX systems will dep @comment ** 6.9.50B UPDATE ** @comment ********************************************************************* @page -@newsubsection{6.9.50B,UPDATE} +@newsubsection{UPDATE} @diagram{UPDATE Clause,DD-UPDATE,DD-UPDATE,None} This syntax is valid in the following sections: @code{SCREEN} @@ -3062,7 +3062,7 @@ The @code{UPDATE} clause will display the existing data before allowing user to @comment ** 6.9.50C UPPER ** @comment ********************************************************************* @page -@newsubsection{6.9.50C,UPPER} +@newsubsection{UPPER} @diagram{UPPER Clause,DD-UPPER,DD-UPPER,None} This syntax is valid in the following sections: @code{SCREEN} @@ -3073,7 +3073,7 @@ The @code{UPPER} clause force the accepted data to be in Upper Case. @comment ** 6.9.51 USAGE ** @comment ********************************************************************* @page -@newsubsection{6.9.51,USAGE} +@newsubsection{USAGE} @diagram{USAGE Clause,DD-USAGE,DD-USAGE,None} This syntax is valid in the following sections: @code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE}, @code{REPORT} @@ -3683,7 +3683,7 @@ The only @code{USAGE} that is allowed in the report section is @code{USAGE DISPL @comment ** 6.9.52 USING ** @comment ********************************************************************* @page -@newsubsection{6.9.52,USING} +@newsubsection{USING} @diagram{USING Clause,DD-USING,DD-USING,None} This syntax is valid in the following sections: @code{SCREEN} @@ -3703,7 +3703,7 @@ The @syntaxref{FROM}, @syntaxref{TO}, @code{USING} and @syntaxref{VALUE} clauses @comment ** 6.9.53 VALUE ** @comment ********************************************************************* @page -@newsubsection{6.9.53,VALUE} +@newsubsection{VALUE} @diagram{VALUE (Condition Names) Clause,DD-VALUE-1,DD-VALUE-1,None} @diagram{VALUE (Other Data Items),DD-VALUE-2,DD-VALUE-2,None} @diagram{VALUE (For Tables),DD-VALUE-3,DD-VALUE-3,None} diff --git a/guide/7.texi b/guide/7.texi index dbf9200..cf8cca9 100644 --- a/guide/7.texi +++ b/guide/7.texi @@ -1,33 +1,33 @@ @comment ********************************************************************* @comment ** 7. PROCEDURE DIVISION ** @comment ********************************************************************* -@newchapter{7,PROCEDURE DIVISION} +@newchapter{PROCEDURE DIVISION} @diagram{PROCEDURE DIVISION,PD-Overview-Info,PD-Overview-TeX,None} The @code{PROCEDURE DIVISION} of any GnuCOBOL program marks the point where all executable code is written. @menu -* 7.1: PROCEDURE DIVISION USING. -* 7.2: PROCEDURE DIVISION CHAINING. -* 7.3: PROCEDURE DIVISION RETURNING. -* 7.4: PROCEDURE DIVISION Sections and Paragraphs. -* 7.5: DECLARATIVES. -* 7.6: Common Clauses on Executable Statements. +* PROCEDURE DIVISION USING. +* PROCEDURE DIVISION CHAINING. +* PROCEDURE DIVISION RETURNING. +* PROCEDURE DIVISION Sections and Paragraphs. +* DECLARATIVES. +* Common Clauses on Executable Statements. @detailmenu -* 7.6.1: AT END + NOT AT END. -* 7.6.2: CORRESPONDING. -* 7.6.3: INVALID KEY + NOT INVALID KEY. -* 7.6.4: ON EXCEPTION + NOT ON EXCEPTION. -* 7.6.5: ON OVERFLOW + NOT ON OVERFLOW. -* 7.6.6: ON SIZE ERROR + NOT ON SIZE ERROR. -* 7.6.7: ROUNDED. +* AT END + NOT AT END. +* CORRESPONDING. +* INVALID KEY + NOT INVALID KEY. +* ON EXCEPTION + NOT ON EXCEPTION. +* ON OVERFLOW + NOT ON OVERFLOW. +* ON SIZE ERROR + NOT ON SIZE ERROR. +* ROUNDED. @end detailmenu -* 7.7: Special Registers. -* 7.8: GnuCOBOL Statements. +* Special Registers. +* GnuCOBOL Statements. @end menu @comment ********************************************************************* @comment ** 7.1 PROCEDURE DIVISION USING ** @comment ********************************************************************* @page -@newsection{7.1,PROCEDURE DIVISION USING} +@newsection{PROCEDURE DIVISION USING} @diagram{PROCEDURE DIVISION Subprogram-Argument,PD-USING,PD-USING,None} The @code{USING} clause defines the arguments that will be passed to a GnuCOBOL program which is serving as a subprogram. @enumerate @@ -87,7 +87,7 @@ The @comment ** 7.2 PROCEDURE DIVISION CHAINING ** @comment ********************************************************************* @page -@newsection{7.2,PROCEDURE DIVISION CHAINING} +@newsection{PROCEDURE DIVISION CHAINING} @diagram{PROCEDURE DIVISION Main-Program-Argument,PD-CHAINING,PD-CHAINING,None} The @code{CHAINING} term provides one mechanism a programmer may use to retrieve command-line arguments passed to a program at execution time. @enumerate @@ -130,7 +130,7 @@ This behaviour when the argument is defined as @code{PIC 9} may be unacceptable, @comment ** 7.3 PROCEDURE DIVISION RETURNING ** @comment ********************************************************************* @page -@newsection{7.3,PROCEDURE DIVISION RETURNING} +@newsection{PROCEDURE DIVISION RETURNING} @diagram{PROCEDURE DIVISION RETURNING,PD-RETURNING,PD-RETURNING,None} The RETURNING clause on the PROCEDURE DIVISION header documents that the subprogram in which the clause appears will be returning a numeric value back to the program that called it. This is only available for functions as it does not work for programs and has issues depending on the platform (operating system) in use - You must test for this for the specific platform. @comment Semantic Specifications: @@ -164,7 +164,7 @@ A data item defined with the @syntaxref{EXTERNAL} attribute in a subprogram and @comment ** 7.4 PROCEDURE DIVISION Sections and Paragraphs ** @comment ********************************************************************* @page -@newsection{7.4,PROCEDURE DIVISION Sections and Paragraphs} +@newsection{PROCEDURE DIVISION Sections and Paragraphs} The procedure division is the only one of the COBOL divisions that allows you to create your own sections and paragraphs. These are collectively referred to as @define{Procedures}, and the names you create for those sections and paragraphs are called @define{Procedure Names}. @@ -204,7 +204,7 @@ When any procedure division statement that references procedures is used. These @comment ** 7.5 DECLARATIVES ** @comment ********************************************************************* @page -@newsection{7.5,DECLARATIVES} +@newsection{DECLARATIVES} @diagram{DECLARATIVES,PD-DECLARATIVES,PD-DECLARATIVES,PD-DECLARATIVES} The @code{DECLARATIVES} area of the procedure division allows the programmer to define a series of ``trap'' procedures (referred to as declarative procedures) capable of intercepting certain events that may occur at program execution time. The syntax diagram above shows the format of a single such procedure. @enumerate @@ -317,20 +317,20 @@ Declarative procedures may not reference any other procedures defined outside th @comment ********************************************************************* @comment ** 7.6 Common Clauses on Executable Statements ** @comment ********************************************************************* -@newsection{7.6,Common Clauses on Executable Statements} +@newsection{Common Clauses on Executable Statements} @menu -* 7.6.1: AT END + NOT AT END. -* 7.6.2: CORRESPONDING. -* 7.6.3: INVALID KEY + NOT INVALID KEY. -* 7.6.4: ON EXCEPTION + NOT ON EXCEPTION. -* 7.6.5: ON OVERFLOW + NOT ON OVERFLOW. -* 7.6.6: ON SIZE ERROR + NOT ON SIZE ERROR. -* 7.6.7: ROUNDED. +* AT END + NOT AT END. +* CORRESPONDING. +* INVALID KEY + NOT INVALID KEY. +* ON EXCEPTION + NOT ON EXCEPTION. +* ON OVERFLOW + NOT ON OVERFLOW. +* ON SIZE ERROR + NOT ON SIZE ERROR. +* ROUNDED. @end menu @comment ********************************************************************* @comment ** 7.6.1 AT END + NOT AT END ** @comment ********************************************************************* -@newsubsection{7.6.1,AT END + NOT AT END} +@newsubsection{AT END + NOT AT END} @diagram{AT END,PD-AT-END,PD-AT-END,None} @code{AT END} clauses may be specified on @syntaxref{READ}, @syntaxref{RETURN}, @syntaxref{SEARCH} and @syntaxref{SEARCH ALL} statements. @enumerate @@ -362,7 +362,7 @@ The @code{NOT AT END} clause is not allowed on either form of table search. @comment ** 7.6.2 CORRESPONDING ** @comment ********************************************************************* @page -@newsubsection{7.6.2,CORRESPONDING} +@newsubsection{CORRESPONDING} Three GnuCOBOL statements --- @syntaxrefalt{ADD,ADD CORRESPONDING}, @syntaxrefalt{MOVE,MOVE CORRESPONDING} and @syntaxrefalt{SUBTRACT,SUBTRACT CORRESPONDING} support the use of a @code{CORRESPONDING} option: @verbatim ADD CORRESPONDING group-item-1 TO group-item-2 @@ -459,7 +459,7 @@ The following are the @code{CORRESPONDING} match ups that passed rule #1 (but fa @comment ********************************************************************* @comment ** 7.6.3 INVALID KEY + NOT INVALID KEY ** @comment ********************************************************************* -@newsubsection{7.6.3,INVALID KEY + NOT INVALID KEY} +@newsubsection{INVALID KEY + NOT INVALID KEY} @diagram{INVALID KEY,PD-INVALID-KEY,PD-INVALID-KEY,None} @code{INVALID KEY} clauses may be specified on @syntaxref{DELETE}, @syntaxrefalt{READ,Random READ}, @syntaxref{REWRITE}, @syntaxref{START} and @syntaxref{WRITE} statements. @@ -470,7 +470,7 @@ An optional @comment ********************************************************************* @comment ** 7.6.4 ON EXCEPTION + NOT ON EXCEPTION ** @comment ********************************************************************* -@newsubsection{7.6.4,ON EXCEPTION + NOT ON EXCEPTION} +@newsubsection{ON EXCEPTION + NOT ON EXCEPTION} @diagram{ON EXCEPTION,PD-ON-EXCEPTION,PD-ON-EXCEPTION,None} @code{EXCEPTION} clauses may be specified on @syntaxref{ACCEPT}, @syntaxref{CALL} and @syntaxref{DISPLAY} statements. @@ -481,7 +481,7 @@ An optional @comment ********************************************************************* @comment ** 7.6.5 ON OVERFLOW + NOT ON OVERFLOW ** @comment ********************************************************************* -@newsubsection{7.6.5,ON OVERFLOW + NOT ON OVERFLOW} +@newsubsection{ON OVERFLOW + NOT ON OVERFLOW} @diagram{ON OVERFLOW,PD-ON-OVERFLOW,PD-ON-OVERFLOW,None} @code{OVERFLOW} clauses may be specified on @syntaxref{CALL}, @syntaxref{STRING} and @syntaxref{UNSTRING} statements. @@ -492,7 +492,7 @@ An optional @comment ********************************************************************* @comment ** 7.6.6 ON SIZE ERROR + NOT ON SIZE ERROR ** @comment ********************************************************************* -@newsubsection{7.6.6,ON SIZE ERROR + NOT ON SIZE ERROR} +@newsubsection{ON SIZE ERROR + NOT ON SIZE ERROR} @diagram{ON SIZE ERROR,PD-ON-SIZE-ERROR,PD-ON-SIZE-ERROR,None} @code{SIZE ERROR} clauses may be included on @syntaxref{ADD}, @syntaxref{COMPUTE}, @syntaxref{DIVIDE}, @syntaxref{MULTIPLY} and @syntaxref{SUBTRACT} statements. @@ -503,7 +503,7 @@ An optional @comment ********************************************************************* @comment ** 7.6.7 ROUNDED ** @comment ********************************************************************* -@newsubsection{7.6.7,ROUNDED} +@newsubsection{ROUNDED} @diagram{ROUNDED,PD-ROUNDED,PD-ROUNDED,None} GnuCOBOL provides for control over the final rounding process applied to the receiving fields on all arithmetic verbs. Each of the arithmetic statements (@syntaxref{ADD}, @syntaxref{COMPUTE}, @syntaxref{DIVIDE}, @syntaxref{MULTIPLY} and @syntaxref{SUBTRACT}) statements allow an optional @code{ROUNDED} clause to be applied to each receiving data item. @@ -598,7 +598,7 @@ Rounding is to the nearest value whose magnitude is smaller. @comment ** 7.7 Special Registers ** @comment ********************************************************************* @page -@newsection{7.7,Special Registers} +@newsection{Special Registers} GnuCOBOL, like other COBOL dialects, includes a number of data items that are automatically available to a programmer without the need to actually define them in the data division. COBOL refers to such items as registers or special registers. The special registers available to a GnuCOBOL program are as follows: @table @asis @item @code{COB-CRT-STATUS} @@ -632,7 +632,7 @@ Group Item --- A group item in which debugging information generated by a @code{ @comment ********************************************************************* @comment ** 1.3.21 LENGTH OF ** @comment ********************************************************************* -@comment @newsubsection{1.3.21,LENGTH OF} +@comment @newsubsection{LENGTH OF} @page @diagram{LENGTH OF,PD-LENGTH-OF,PD-LENGTH-OF,None} Alphanumeric literals and identifiers may optionally be prefixed with the @code{LENGTH OF} clause. The compile-time value generated by this clause will be the number of bytes in the alphanumeric literal or the defined size (in bytes) of the identifier. @@ -662,153 +662,153 @@ As part of the @code{TIMES} clause of a @statementref{PERFORM}. @comment ** 7.8 GnuCOBOL Statements ** @comment ********************************************************************* @page -@newsection{7.8,GnuCOBOL Statements} +@newsection{GnuCOBOL Statements} @comment The following menu is hidden in html mode because it makes @comment makeinfo segfault on some Linux distributions, and it is not @comment actually necessary in html mode. @iftex @menu -* 7.8.1: ACCEPT +* ACCEPT @detailmenu -* 7.8.1.1: ACCEPT FROM CONSOLE -* 7.8.1.2: ACCEPT FROM COMMAND-LINE -* 7.8.1.3: ACCEPT FROM ENVIRONMENT -* 7.8.1.4: ACCEPT Data-Item -* 7.8.1.5: ACCEPT FROM DATE/TIME -* 7.8.1.6: ACCEPT FROM Screen-Info -* 7.8.1.7: ACCEPT FROM Runtime-Info -* 7.8.1.8: ACCEPT OMITTED -* 7.8.1.9: ACCEPT FROM EXCEPTION STATUS +* ACCEPT FROM CONSOLE +* ACCEPT FROM COMMAND-LINE +* ACCEPT FROM ENVIRONMENT +* ACCEPT Data-Item +* ACCEPT FROM DATE/TIME +* ACCEPT FROM Screen-Info +* ACCEPT FROM Runtime-Info +* ACCEPT OMITTED +* ACCEPT FROM EXCEPTION STATUS @end detailmenu -* 7.8.2: ADD +* ADD @detailmenu -* 7.8.2.1: ADD TO -* 7.8.2.2: ADD GIVING -* 7.8.2.3: ADD CORRESPONDING +* ADD TO +* ADD GIVING +* ADD CORRESPONDING @end detailmenu -* 7.8.3: ALLOCATE -* 7.8.4: ALTER -* 7.8.5: CALL -* 7.8.6: CANCEL -* 7.8.7: CLOSE -* 7.8.8: COMMIT -* 7.8.9: COMPUTE -* 7.8.10: CONTINUE -* 7.8.11: DELETE -* 7.8.12: DISPLAY +* ALLOCATE +* ALTER +* CALL +* CANCEL +* CLOSE +* COMMIT +* COMPUTE +* CONTINUE +* DELETE +* DISPLAY @detailmenu -* 7.8.12.1: DISPLAY UPON device -* 7.8.12.2: DISPLAY UPON COMMAND-LINE -* 7.8.12.3: DISPLAY UPON ENVIRONMENT-NAME -* 7.8.12.4: DISPLAY data-item -* 7.8.12.5: DISPLAY data-item (Microsoft v1, 2) +* DISPLAY UPON device +* DISPLAY UPON COMMAND-LINE +* DISPLAY UPON ENVIRONMENT-NAME +* DISPLAY data-item +* DISPLAY data-item (Microsoft v1-v2) @end detailmenu -* 7.8.13: DIVIDE +* DIVIDE @detailmenu -* 7.8.13.1: DIVIDE INTO -* 7.8.13.2: DIVIDE INTO GIVING -* 7.8.13.3: DIVIDE BY GIVING +* DIVIDE INTO +* DIVIDE INTO GIVING +* DIVIDE BY GIVING @end detailmenu -* 7.8.14: ENTRY -* 7.8.15: EVALUATE -* 7.8.15B: EXAMINE -* 7.8.16: EXHIBIT -* 7.8.17: EXIT -* 7.8.18: FREE -* 7.8.19: GENERATE -* 7.8.20: GOBACK -* 7.8.21: GO TO +* ENTRY +* EVALUATE +* EXAMINE +* EXHIBIT +* EXIT +* FREE +* GENERATE +* GOBACK +* GO TO @detailmenu -* 7.8.21.1: Simple GO TO -* 7.8.21.2: GO TO DEPENDING ON +* Simple GO TO +* GO TO DEPENDING ON @end detailmenu -* 7.8.22: IF -* 7.8.23: INITIALIZE -* 7.8.24: INITIATE -* 7.8.25: INSPECT -* 7.8.26: MERGE -* 7.8.27: MOVE +* IF +* INITIALIZE +* INITIATE +* INSPECT +* MERGE +* MOVE @detailmenu -* 7.8.27.1: Simple MOVE -* 7.8.27.2: MOVE CORRESPONDING +* Simple MOVE +* MOVE CORRESPONDING @end detailmenu -* 7.8.28: MULTIPLY +* MULTIPLY @detailmenu -* 7.8.28.1: MULTIPLY BY -* 7.8.28.2: MULTIPLY GIVING +* MULTIPLY BY +* MULTIPLY GIVING @end detailmenu -* 7.8.29: OPEN -* 7.8.30: PERFORM +* OPEN +* PERFORM @detailmenu -* 7.8.30.1: Procedural PERFORM -* 7.8.30.2: Inline PERFORM +* Procedural PERFORM +* Inline PERFORM @end detailmenu -* 7.8.31: READ +* READ @detailmenu -* 7.8.31.1: Sequential READ -* 7.8.31.2: Random READ +* Sequential READ +* Random READ @end detailmenu -* 7.8.32: READY TRACE -* 7.8.33: RELEASE -* 7.8.34: RESET TRACE -* 7.8.35: RETURN -* 7.8.36: REWRITE -* 7.8.37: ROLLBACK -* 7.8.38: SEARCH -* 7.8.39: SEARCH ALL -* 7.8.40: SET +* READY TRACE +* RELEASE +* RESET TRACE +* RETURN +* REWRITE +* ROLLBACK +* SEARCH +* SEARCH ALL +* SET @detailmenu -* 7.8.40.1: SET ENVIRONMENT -* 7.8.40.2: SET Program-Pointer -* 7.8.40.3: SET ADDRESS -* 7.8.40.4: SET Index -* 7.8.40.5: SET UP/DOWN -* 7.8.40.6: SET Condition Name -* 7.8.40.7: SET Switch -* 7.8.40.8: SET ATTRIBUTE -* 7.8.40.9: SET LAST EXCEPTION +* SET ENVIRONMENT +* SET Program-Pointer +* SET ADDRESS +* SET Index +* SET UP/DOWN +* SET Condition Name +* SET Switch +* SET ATTRIBUTE +* SET LAST EXCEPTION @end detailmenu -* 7.8.41: SORT +* SORT @detailmenu -* 7.8.41.1: File-Based SORT -* 7.8.41.2: Table SORT +* File-Based SORT +* Table SORT @end detailmenu -* 7.8.42: START -* 7.8.43: STOP -* 7.8.44: STRING -* 7.8.45: SUBTRACT +* START +* STOP +* STRING +* SUBTRACT @detailmenu -* 7.8.45.1: SUBTRACT FROM -* 7.8.45.2: SUBTRACT GIVING -* 7.8.45.3: SUBTRACT CORRESPONDING +* SUBTRACT FROM +* SUBTRACT GIVING +* SUBTRACT CORRESPONDING @end detailmenu -* 7.8.46: SUPPRESS -* 7.8.47: TERMINATE -* 7.8.48: TRANSFORM -* 7.8.49: UNLOCK -* 7.8.50: UNSTRING -* 7.8.51: WRITE +* SUPPRESS +* TERMINATE +* TRANSFORM +* UNLOCK +* UNSTRING +* WRITE @end menu @end iftex @comment ********************************************************************* @comment ** 7.8.1 ACCEPT ** @comment ********************************************************************* -@newsubsection{7.8.1,ACCEPT} +@newsubsection{ACCEPT} @menu -* 7.8.1.1: ACCEPT FROM CONSOLE -* 7.8.1.2: ACCEPT FROM COMMAND-LINE -* 7.8.1.3: ACCEPT FROM ENVIRONMENT -* 7.8.1.4: ACCEPT data-item -* 7.8.1.5: ACCEPT FROM DATE/TIME -* 7.8.1.6: ACCEPT FROM Screen-Info -* 7.8.1.7: ACCEPT FROM Runtime-Info -* 7.8.1.8: ACCEPT OMITTED -* 7.8.1.9: ACCEPT FROM EXCEPTION STATUS +* ACCEPT FROM CONSOLE +* ACCEPT FROM COMMAND-LINE +* ACCEPT FROM ENVIRONMENT +* ACCEPT data-item +* ACCEPT FROM DATE/TIME +* ACCEPT FROM Screen-Info +* ACCEPT FROM Runtime-Info +* ACCEPT OMITTED +* ACCEPT FROM EXCEPTION STATUS @end menu @comment ********************************************************************* @comment ** 7.8.1.1 ACCEPT FROM CONSOLE ** @comment ********************************************************************* -@newunit{7.8.1.1,ACCEPT FROM CONSOLE} +@newsubsubsection{ACCEPT FROM CONSOLE} @diagram{ACCEPT FROM CONSOLE,PD-ACCEPT-1,PD-ACCEPT-1,None} This format of the @statement{ACCEPT} is used to read a value from the console window or the standard input device and store it into a data item (@var{identifier-1}). @enumerate @@ -831,7 +831,7 @@ If @var{identifier-1} is a numeric data item, the character value read from the @comment ** 7.8.1.2 ACCEPT FROM COMMAND-LINE ** @comment ********************************************************************* @page -@newunit{7.8.1.2,ACCEPT FROM COMMAND-LINE} +@newsubsubsection{ACCEPT FROM COMMAND-LINE} @diagram{ACCEPT FROM COMMAND-LINE,PD-ACCEPT-2,PD-ACCEPT-2,None} This format of the @statement{ACCEPT} is used to retrieve information from the program's command line. @@ -873,7 +873,7 @@ The optional @code{ON EXCEPTION} and @code{NOT ON EXCEPTION} clauses may be used @comment ** 7.8.1.3 ACCEPT FROM ENVIRONMENT ** @comment ********************************************************************* @page -@newunit{7.8.1.3,ACCEPT FROM ENVIRONMENT} +@newsubsubsection{ACCEPT FROM ENVIRONMENT} @diagram{ACCEPT FROM ENVIRONMENT,PD-ACCEPT-3,PD-ACCEPT-3,None} This format of the @statement{ACCEPT} is used to retrieve environment variable values. @enumerate @@ -899,7 +899,7 @@ The optional @code{ON EXCEPTION} and @code{NOT ON EXCEPTION} clauses may be used @comment ** 7.8.1.4 ACCEPT data-item ** @comment ******************************************************************** @page -@newunit{7.8.1.4,ACCEPT data-item} +@newsubsubsection{ACCEPT data-item} @diagram{ACCEPT data-item,PD-ACCEPT-4,PD-ACCEPT-4,PD-ACCEPT-4} This format of the @statement{ACCEPT} is used to retrieve data from a working storate item or a formatted console window screen. @enumerate @@ -1211,7 +1211,7 @@ The optional @code{EXCEPTION-STATUS} clause may be used to detect exceptions fro @comment ** 7.8.1.5 ACCEPT FROM DATE/TIME ** @comment ********************************************************************* @page -@newunit{7.8.1.5,ACCEPT FROM DATE/TIME} +@newsubsubsection{ACCEPT FROM DATE/TIME} @diagram{ACCEPT FROM DATE/TIME,PD-ACCEPT-5,PD-ACCEPT-5,None} This format of the @statement{ACCEPT} is used to retrieve the current system date, time or current day of the week and store it into a data item. @enumerate @@ -1243,7 +1243,7 @@ high precision (up to eight decimal places for fractional seconds). @comment ** 7.8.1.6 ACCEPT FROM Screen-Info ** @comment ********************************************************************* @page -@newunit{7.8.1.6,ACCEPT FROM Screen-Info} +@newsubsubsection{ACCEPT FROM Screen-Info} @diagram{ACCEPT FROM Screen-Info,PD-ACCEPT-6,PD-ACCEPT-6,None} This format of the @statement{ACCEPT} is used to retrieve information about the console window or about the user's interactions with it. @enumerate @@ -1287,7 +1287,7 @@ The @comment ** 7.8.1.7 ACCEPT FROM Runtime-Info ** @comment ********************************************************************* @page -@newunit{7.8.1.7,ACCEPT FROM Runtime-Info} +@newsubsubsection{ACCEPT FROM Runtime-Info} @diagram{ACCEPT FROM Runtime-Info,PD-ACCEPT-7,PD-ACCEPT-7,None} This format of the @statement{ACCEPT} is used to retrieve run-time information such as the most-recent error exception code and the current user's user name. @enumerate @@ -1327,7 +1327,7 @@ If excess space is allocated, the returned value will be padded with spaces (to @comment ** 7.8.1.8 ACCEPT OMITTED ** @comment ********************************************************************* @page -@newunit{7.8.1.8,ACCEPT OMITTED} +@newsubsubsection{ACCEPT OMITTED} @diagram{ACCEPT OMITTED,PD-ACCEPT-8,PD-ACCEPT-8,None} This format of the @statement{ACCEPT} will wait for a keyboard event that terminates input; function keys, or Enter/Return, among others. CRT STATUS (COB-CRT-STATUS @syntaxrefalt{CRT STATUS,SPECIAL-NAMES} if not explicitly defined) is set with the keycode, listed in copy/screenio.cpy. It also handles a few other keycode terminations not normally used to complete an extended accept. @enumerate @@ -1350,7 +1350,7 @@ You can use extended attributes, useful for setting timeouts or positioning. @comment ** 7.8.1.9 ACCEPT FROM EXCEPTION STATUS ** @comment ********************************************************************* @page -@newunit{7.8.1.9,ACCEPT FROM EXCEPTION STATUS} +@newsubsubsection{ACCEPT FROM EXCEPTION STATUS} @diagram{ACCEPT FROM EXCEPTION STATUS,PD-ACCEPT-9,PD-ACCEPT-9,None} This format of the @statement{ACCEPT} will receive the status for any exceptions resulting from a previous valid verb. @enumerate @@ -1375,16 +1375,16 @@ The following is an example of usage: @comment ** 7.8.2 ADD ** @comment ********************************************************************* @page -@newsubsection{7.8.2,ADD} +@newsubsection{ADD} @menu -* 7.8.2.1: ADD TO -* 7.8.2.2: ADD GIVING -* 7.8.2.3: ADD CORRESPONDING +* ADD TO +* ADD GIVING +* ADD CORRESPONDING @end menu @comment ********************************************************************* @comment ** 7.8.2.1 ADD TO ** @comment ********************************************************************* -@newunit{7.8.2.1,ADD TO} +@newsubsubsection{ADD TO} @diagram{ADD TO,PD-ADD-1,PD-ADD-1,None} This format of the @statement{ADD} generates an intermediate arithmetic sum of the values of all @var{identifier-1} and @var{literal-1}) items. The value of each @var{identifier-2} will be replaced, in turn, by the sum of that @var{identifier-2}s value and the intermediate sum. @enumerate @@ -1413,7 +1413,7 @@ The optional @code{ON SIZE ERROR} and @code{NOT ON SIZE ERROR} clauses may be us @comment ** 7.8.2.2 ADD GIVING ** @comment ********************************************************************* @page -@newunit{7.8.2.2,ADD GIVING} +@newsubsubsection{ADD GIVING} @diagram{ADD GIVING,PD-ADD-2,PD-ADD-2,None} This format of the @code{ADD} statement generates the arithmetic sum of the values of all @var{identifier-1}, @var{literal-1}) and @var{identifier-2} (if any) items and then saves that sum to each @var{identifier-3}. @enumerate @@ -1445,7 +1445,7 @@ The optional @code{ON SIZE ERROR} and @code{NOT ON SIZE ERROR} clauses may be us @comment ** 7.8.2.3 ADD CORRESPONDING ** @comment ********************************************************************* @page -@newunit{7.8.2.3,ADD CORRESPONDING} +@newsubsubsection{ADD CORRESPONDING} @diagram{ADD CORRESPONDING,PD-ADD-3,PD-ADD-3,None} This format of the @statement{ADD} generates code equivalent to individual @syntaxref{ADD TO} statements for corresponding matches of data items found subordinate to the two identifiers. @enumerate @@ -1470,7 +1470,7 @@ The optional @code{ON SIZE ERROR} and @code{NOT ON SIZE ERROR} clauses may be us @comment ** 7.8.3 ALLOCATE ** @comment ********************************************************************* @page -@newsubsection{7.8.3,ALLOCATE} +@newsubsection{ALLOCATE} @diagram{ALLOCATE,PD-ALLOCATE,PD-ALLOCATE,None} The @code{ALLOCATE} statement is used to dynamically allocate memory at run-time. @enumerate @@ -1530,7 +1530,7 @@ Referencing a @code{BASED} data item either before its storage has been allocate @comment ** 7.8.4 ALTER ** @comment ********************************************************************* @page -@newsubsection{7.8.4,ALTER} +@newsubsection{ALTER} @diagram{ALTER,PD-ALTER,PD-ALTER,None} The @statement{ALTER} was used in the early years of the COBOL language to edit the object code of a program @strong{at execution time}, changing a @syntaxrefalt{GO TO,Simple GO TO} statement to branch to a spot in the program different than where the @code{GO TO} statement was originally compiled for. @enumerate @@ -1556,7 +1556,7 @@ Because of the catastrophic effect this statement has on program readability and @comment ** 7.8.5 CALL ** @comment ********************************************************************* @page -@newsubsection{7.8.5,CALL} +@newsubsection{CALL} @diagram{CALL,PD-CALL,PD-CALL,None} @diagram{CALL Argument,PD-CALL-Arg,PD-CALL-Arg,None} The @statement{CALL} is used to transfer control to a subroutine. @xref{Sub-Programming}, for the specifics of using subprograms with GnuCOBOL programs. @@ -1668,7 +1668,7 @@ An extension of @code{CALL} allows a call to a @var{Program-Pointer-1} which is @comment ** 7.8.6 CANCEL ** @comment ********************************************************************* @page -@newsubsection{7.8.6,CANCEL} +@newsubsection{CANCEL} @diagram{CANCEL,PD-CANCEL,PD-CANCEL,None} The @statement{CANCEL} unloads the dynamically-loadable subprogram module containing the entry-point specified as @var{literal-1} or @var{identifier-1} from memory. @enumerate @@ -1684,7 +1684,7 @@ Whether the @comment ** 7.8.7 CLOSE ** @comment ********************************************************************* @page -@newsubsection{7.8.7,CLOSE} +@newsubsection{CLOSE} @diagram{CLOSE,PD-CLOSE,PD-CLOSE,PD-CLOSE} The @statement{CLOSE} terminates the program's access to the specified file(s). @enumerate @@ -1710,7 +1710,7 @@ When a @syntaxref{ORGANIZATION LINE SEQUENTIAL} or @syntaxref{LINE ADVANCING} fi @comment ** 7.8.8 COMMIT ** @comment ********************************************************************* @page -@newsubsection{7.8.8,COMMIT} +@newsubsection{COMMIT} @diagram{COMMIT,PD-COMMIT,PD-COMMIT,None} The @statement{COMMIT} performs an @code{UNLOCK} against every currently-open file, but does not close any of the files. See the @statementref{UNLOCK} for additional details. @@ -1718,7 +1718,7 @@ See the @statementref{UNLOCK} for additional details. @comment ** 7.8.9 COMPUTE ** @comment ********************************************************************* @page -@newsubsection{7.8.9,COMPUTE} +@newsubsection{COMPUTE} @diagram{COMPUTE,PD-COMPUTE,PD-COMPUTE,None} The @statement{COMPUTE} provides a means of easily performing complex arithmetic operations with a single statement, instead of using cumbersome and possibly confusing sequences of @code{ADD}, @code{SUBTRACT}, @code{MULTIPLY} and @code{DIVIDE} statements. @code{COMPUTE} also allows the use of exponentiation --- an arithmetic operation for which no other statement exists in COBOL. @enumerate @@ -1746,7 +1746,7 @@ The optional @code{ON SIZE ERROR} and @code{NOT ON SIZE ERROR} clauses may be us @comment ** 7.8.10 CONTINUE ** @comment ********************************************************************* @page -@newsubsection{7.8.10,CONTINUE} +@newsubsection{CONTINUE} @diagram{CONTINUE,PD-CONTINUE,PD-CONTINUE,None} The @statement{CONTINUE} is a no-operation statement that may be coded anywhere an imperative statement (@pxref{Imperative Statement}) may be coded. @enumerate @@ -1763,7 +1763,7 @@ The optional extension of (AFTER) when used with the @code{CONTINUE} statement p @comment ** 7.8.11 DELETE ** @comment ********************************************************************* @page -@newsubsection{7.8.11,DELETE} +@newsubsection{DELETE} @diagram{DELETE,PD-DELETE,PD-DELETE,None} The @statement{DELETE} logically deletes a record from a COBOL file. @enumerate @@ -1800,18 +1800,18 @@ No @code{INVALID KEY} or @code{NOT INVALID KEY} clause may be specified for a fi @comment ** 7.8.12 DISPLAY ** @comment ********************************************************************* @page -@newsubsection{7.8.12,DISPLAY} +@newsubsection{DISPLAY} @menu -* 7.8.12.1: DISPLAY UPON device -* 7.8.12.2: DISPLAY UPON COMMAND-LINE -* 7.8.12.3: DISPLAY UPON ENVIRONMENT-NAME -* 7.8.12.4: DISPLAY data-item -* 7.8.12.5: DISPLAY data-item (Microsoft) +* DISPLAY UPON device +* DISPLAY UPON COMMAND-LINE +* DISPLAY UPON ENVIRONMENT-NAME +* DISPLAY data-item +* DISPLAY data-item (Microsoft) @end menu @comment ********************************************************************* @comment ** 7.8.12.1 DISPLAY UPON device ** @comment ********************************************************************* -@newunit{7.8.12.1,DISPLAY UPON device} +@newsubsubsection{DISPLAY UPON device} @diagram{DISPLAY UPON device,PD-DISPLAY-1,PD-DISPLAY-1,None} This format of the @statement{DISPLAY} displays the specified identifier contents and/or literal values on the system output device specified via the @code{UPON} clause. @enumerate @@ -1840,7 +1840,7 @@ The optional @code{ON EXCEPTION} and @code{NOT ON EXCEPTION} clauses may be used @comment ** 7.8.12.2 DISPLAY UPON COMMAND-LINE ** @comment ********************************************************************* @page -@newunit{7.8.12.2,DISPLAY UPON COMMAND-LINE} +@newsubsubsection{DISPLAY UPON COMMAND-LINE} @diagram{DISPLAY UPON COMMAND-LINE,PD-DISPLAY-2,PD-DISPLAY-2,None} This form of the @statement{DISPLAY} may be used to specify the command-line argument number to be retrieved by a subsequent @statementrefalt{ACCEPT FROM ARGUMENT-VALUE,ACCEPT FROM COMMAND-LINE} or to specify a new value for the command-line arguments themselves. @enumerate @@ -1864,7 +1864,7 @@ The optional @code{ON EXCEPTION} and @code{NOT ON EXCEPTION} clauses may be used @comment ** 7.8.12.3 DISPLAY UPON ENVIRONMENT-NAME ** @comment ********************************************************************* @page -@newunit{7.8.12.3,DISPLAY UPON ENVIRONMENT-NAME} +@newsubsubsection{DISPLAY UPON ENVIRONMENT-NAME} @diagram{DISPLAY UPON ENVIRONMENT-NAME,PD-DISPLAY-3-Info,PD-DISPLAY-3-TeX,None} This form of the @statement{DISPLAY} can be used to create or modify environment variables. @enumerate @@ -1895,7 +1895,7 @@ The optional @code{ON EXCEPTION} and @code{NOT ON EXCEPTION} clauses may be used @comment ** 7.8.12.4 DISPLAY data-item ** @comment ************************************************************* @page -@newunit{7.8.12.4,DISPLAY data-item} +@newsubsubsection{DISPLAY data-item} @diagram{DISPLAY data-item,PD-DISPLAY-4,PD-DISPLAY-4,PD-DISPLAY-4} This format of the @statement{DISPLAY} presents data onto a formatted screen. @enumerate @@ -1981,7 +1981,7 @@ When @code{DISPLAY} is used without line or column controls only one variable or @comment ** 7.8.12.5 DISPLAY data-item (Microsoft) ** @comment ************************************************************* @page -@newunit{7.8.12.5,DISPLAY data-item (Microsoft)} +@newsubsubsection{DISPLAY data-item (Microsoft v1-v2)} @diagram{DISPLAY data-item,PD-DISPLAY-5,PD-DISPLAY-5,None} This format of the @statement{DISPLAY} presents data onto a formatted screen using the Microsoft format from v1 and v2 compilers (MsDos). @@ -1989,16 +1989,16 @@ This format of the @statement{DISPLAY} presents data onto a formatted screen usi @comment ** 7.8.13 DIVIDE ** @comment ********************************************************************* @page -@newsubsection{7.8.13,DIVIDE} +@newsubsection{DIVIDE} @menu -* 7.8.13.1: DIVIDE INTO -* 7.8.13.2: DIVIDE INTO GIVING -* 7.8.13.3: DIVIDE BY GIVING +* DIVIDE INTO +* DIVIDE INTO GIVING +* DIVIDE BY GIVING @end menu @comment ********************************************************************* @comment ** 7.8.13.1 DIVIDE INTO ** @comment ********************************************************************* -@newunit{7.8.13.1,DIVIDE INTO} +@newsubsubsection{DIVIDE INTO} @diagram{DIVIDE INTO,PD-DIVIDE-1,PD-DIVIDE-1,PD-DIVIDE-MAP} This format of the @statement{DIVIDE} will divide a numeric value (specified as a literal or numeric data item) into another numeric value (also specified as a literal or numeric data item) and will then replace the contents of one or more receiving data items with the results of that division. @@ -2028,7 +2028,7 @@ The optional @code{ON SIZE ERROR} and @code{NOT ON SIZE ERROR} clauses may be us @comment ** 7.8.13.2 DIVIDE INTO GIVING ** @comment ********************************************************************* @page -@newunit{7.8.13.2,DIVIDE INTO GIVING} +@newsubsubsection{DIVIDE INTO GIVING} @diagram{DIVIDE INTO GIVING,PD-DIVIDE-2,PD-DIVIDE-2,None} This format of the @statement{DIVIDE} will divide one numeric value (specified as a literal or numeric data item) into another numeric value (also specified as a literal or numeric data item) and will then replace the contents of one or more receiving data items with the results of that division. @enumerate @@ -2061,7 +2061,7 @@ The optional @code{ON SIZE ERROR} and @code{NOT ON SIZE ERROR} clauses may be us @comment ** 7.8.13.3 DIVIDE BY GIVING ** @comment ********************************************************************* @page -@newunit{7.8.13.3,DIVIDE BY GIVING} +@newsubsubsection{DIVIDE BY GIVING} @diagram{DIVIDE BY GIVING,PD-DIVIDE-3,PD-DIVIDE-3,None} This format of the @statement{DIVIDE} will divide one numeric value (specified as a literal or numeric data item) by another numeric value (also specified as a literal or numeric data item) and will then replace the contents of one or more receiving data items with the results of that division. @enumerate @@ -2094,7 +2094,7 @@ The optional @code{ON SIZE ERROR} and @code{NOT ON SIZE ERROR} clauses may be us @comment ** 7.8.14 ENTRY ** @comment ********************************************************************* @page -@newsubsection{7.8.14,ENTRY} +@newsubsection{ENTRY} @diagram{ENTRY,PD-ENTRY,PD-ENTRY,None} @diagram{ENTRY-Argument,PD-ENTRY-Arg,PD-ENTRY-Arg,None} The @statement{ENTRY} is used to define an alternate entry-point into a subroutine, along with the arguments that subroutine will be expecting. @@ -2132,7 +2132,7 @@ The @var{GO TO} with the ENTRY FOR is an GnuCOBOL special purpose extension for @comment ** 7.8.15 EVALUATE ** @comment ********************************************************************* @page -@newsubsection{7.8.15,EVALUATE} +@newsubsection{EVALUATE} @diagram{EVALUATE,PD-EVALUATE,PD-EVALUATE,None} @diagram{EVALUATE Selection Subject,PD-EVALUATE-SS,PD-EVALUATE-SS,None} @diagram{EVALUATE Selection Object,PD-EVALUATE-SO,PD-EVALUATE-SO,None} @@ -2295,7 +2295,7 @@ Bye! @comment ** 7.8.15B EXAMINE ** @comment ********************************************************************* @page -@newsubsection{7.8.15B,EXAMINE} +@newsubsection{EXAMINE} @diagram{EXAMINE,PD-EXAMINE,PD-EXAMINE,None} The @statement{EXAMINE} is the pre runner for INSPECT which should be used over the pre 1970 Cobol standard EXAMINE, and it is used to count the number of times a specified character appears in a data item and/or to replace a character with another character. @enumerate @@ -2347,7 +2347,7 @@ When the UNTIL FIRST option is used, the substitution of literal-2 terminates as @comment ** 7.8.16 EXHIBIT ** @comment ********************************************************************* @page -@newsubsection{7.8.16,EXHIBIT} +@newsubsection{EXHIBIT} @diagram{EXHIBIT,PD-EXHIBIT,PD-EXHIBIT,None} The @statement{EXHIBIT} causes an (optionally conditional) display of the literals, and/or identifiers (optionally preceded by the identifier name) specified in the statement for the purposes of debugging. @enumerate @@ -2405,7 +2405,7 @@ The UPON mnemonic-name-1 clause is not yet implemented but recognised by GnuCO @comment ** 7.8.17 EXIT ** @comment ********************************************************************* @page -@newsubsection{7.8.17,EXIT} +@newsubsection{EXIT} @diagram{EXIT,PD-EXIT,PD-EXIT,None} The @statement{EXIT} is a multi-purpose statement; it may provide a common end point for a series of procedures, exit an in-line @code{PERFORM}, paragraph or section or it may mark the logical end of a subprogram, returning control back to the calling program. @enumerate @@ -2539,7 +2539,7 @@ The COBOL2002 standard has made a common extension to the COBOL language --- the @comment ** 7.8.18 FREE ** @comment ********************************************************************* @page -@newsubsection{7.8.18,FREE} +@newsubsection{FREE} @diagram{FREE,PD-FREE,PD-FREE,None} The @statement{FREE} releases memory previously allocated to the program by the @statementref{ALLOCATE}. @enumerate @@ -2562,7 +2562,7 @@ If @var{identifier-1} is a @code{BASED} data item and that data item is currentl @comment ** 7.8.19 GENERATE ** @comment ********************************************************************* @page -@newsubsection{7.8.19,GENERATE} +@newsubsection{GENERATE} @diagram{GENERATE,PD-GENERATE,PD-GENERATE,None} The @statement{GENERATE} presents data to a report. @enumerate @@ -2624,7 +2624,7 @@ When, during the processing of a subsequent @code{GENERATE}, it is determined t @comment ** 7.8.20 GOBACK ** @comment ********************************************************************* @page -@newsubsection{7.8.20,GOBACK} +@newsubsection{GOBACK} @diagram{GOBACK,PD-GOBACK,PD-GOBACK,None} The @statement{GOBACK} is used to logically terminate an executing program. @enumerate @@ -2644,15 +2644,15 @@ The optional @code{RETURNING} clause provides the opportunity to return a numeri @comment ** 7.8.21 GO TO ** @comment ********************************************************************* @page -@newsubsection{7.8.21,GO TO} +@newsubsection{GO TO} @menu -* 7.8.21.1: Simple GO TO -* 7.8.21.2: GO TO DEPENDING ON +* Simple GO TO +* GO TO DEPENDING ON @end menu @comment ********************************************************************* @comment ** 7.8.21.1 Simple GO TO ** @comment ********************************************************************* -@newunit{7.8.21.1,Simple GO TO} +@newsubsubsection{Simple GO TO} @diagram{Simple GO TO,PD-GO-TO-1,PD-GO-TO-1,None} This form of the @statement{GO TO} unconditionally transfers control in a program to the first executable statement within the specified @var{procedure-name-1}. @enumerate @@ -2686,7 +2686,7 @@ The @code{GO TO ENTRY} format has to be used together with @code{ENTRY FOR GO TO @comment ** 7.8.21.2 GO TO DEPENDING ON ** @comment ********************************************************************* @page -@newunit{7.8.21.2,GO TO DEPENDING ON} +@newsubsubsection{GO TO DEPENDING ON} @diagram{GO TO DEPENDING ON,PD-GO-TO-2,PD-GO-TO-2,None} This form of the @statement{GO TO} will transfer control to any one of a number of specified procedure names depending on the numeric value of the identifier specified on the statement. @enumerate @@ -2766,7 +2766,7 @@ Current programming philosophy would prefer the use of the @statement{EVALUATE} @comment ** 7.8.22 IF ** @comment ********************************************************************* @page -@newsubsection{7.8.22,IF} +@newsubsection{IF} @diagram{IF,PD-IF,PD-IF,None} The @statement{IF} is used to conditionally execute an imperative statement (@pxref{Imperative Statement}) or to select one of two different imperative statements to execute based upon the @code{TRUE}/@code{FALSE} value of a conditional expression. @enumerate @@ -2798,7 +2798,7 @@ Programs coded for 1985 (and beyond) standards don't need it, instead using the @comment ** 7.8.23 INITIALIZE ** @comment ********************************************************************* @page -@newsubsection{7.8.23,INITIALIZE} +@newsubsection{INITIALIZE} @diagram{INITIALIZE,PD-INITIALIZE,PD-INITIALIZE,None} The @statement{INITIALIZE} initializes each @var{identifier-1} with certain specific values, depending upon the options specified. @enumerate @@ -2976,7 +2976,7 @@ INITIALIZE Item-1 REPLACING NUMERIC BY 1 @comment ** 7.8.24 INITIATE ** @comment ********************************************************************* @page -@newsubsection{7.8.24,INITIATE} +@newsubsection{INITIATE} @diagram{INITIATE,PD-INITIATE,PD-INITIATE,None} The @statement{INITIATE} starts Report-Writer Control System (RWCS) processing for a report. @enumerate @@ -3010,7 +3010,7 @@ No report content will actually presented to the report file as a result of a su @comment ** 7.8.25 INSPECT ** @comment ********************************************************************* @page -@newsubsection{7.8.25,INSPECT} +@newsubsection{INSPECT} @diagram{INSPECT,PD-INSPECT,PD-INSPECT,None} The @statement{INSPECT} is used to perform various counting and/or data-alteration operations against strings. @enumerate @@ -3203,7 +3203,7 @@ Each character, in turn, within the ``from'' string will be searched for in the @comment ** 7.8.26 MERGE ** @comment ********************************************************************* @page -@newsubsection{7.8.26,MERGE} +@newsubsection{MERGE} @diagram{MERGE,PD-MERGE-Info,PD-MERGE-TeX,PD-DUPLICATES} The @statement{MERGE} merges the contents of two or more files that have each been pre-sorted on a set of specified identical keys. @enumerate @@ -3287,15 +3287,15 @@ Once the output procedure terminates, or the last @var{file-name-3} file has bee @comment ** 7.8.27 MOVE ** @comment ********************************************************************* @page -@newsubsection{7.8.27,MOVE} +@newsubsection{MOVE} @menu -* 7.8.27.1: Simple MOVE -* 7.8.27.2: MOVE CORRESPONDING +* Simple MOVE +* MOVE CORRESPONDING @end menu @comment ********************************************************************* @comment ** 7.8.27.1 Simple MOVE ** @comment ********************************************************************* -@newunit{7.8.27.1,Simple MOVE} +@newsubsubsection{Simple MOVE} @diagram{Simple MOVE,PD-MOVE-1,PD-MOVE-1,None} The Simple @statement{MOVE} moves a specific value to one or more receiving data items. @enumerate @@ -3314,7 +3314,7 @@ The contents of the @var{identifier-1} data item will not be changed, unless tha @comment ** 7.8.27.2 MOVE CORRESPONDING ** @comment ********************************************************************* @page -@newunit{7.8.27.2,MOVE CORRESPONDING} +@newsubsubsection{MOVE CORRESPONDING} @diagram{MOVE CORRESPONDING,PD-MOVE-2,PD-MOVE-2,None} The @statement{MOVE CORRESPONDING} similarly-named items from one group item to another. @enumerate @@ -3336,15 +3336,15 @@ When corresponding matches are established, the effect of a @code{MOVE CORRESPON @comment ** 7.8.28 MULTIPLY ** @comment ********************************************************************* @page -@newsubsection{7.8.28,MULTIPLY} +@newsubsection{MULTIPLY} @menu -* 7.8.28.1: MULTIPLY BY -* 7.8.28.2: MULTIPLY GIVING +* MULTIPLY BY +* MULTIPLY GIVING @end menu @comment ********************************************************************* @comment ** 7.8.28.1 MULTIPLY BY ** @comment ********************************************************************* -@newunit{7.8.28.1,MULTIPLY BY} +@newsubsubsection{MULTIPLY BY} @diagram{MULTIPLY BY,PD-MULTIPLY-1,PD-MULTIPLY-1,None} The @statement{MULTIPLY BY} computes the product of one or more data items (@var{identifier-2}) and either a numeric literal or another data item. @enumerate @@ -3372,7 +3372,7 @@ The optional @code{ON SIZE ERROR} and @code{NOT ON SIZE ERROR} clauses may be us @comment ** 7.8.28.2,MULTIPLY GIVING ** @comment ********************************************************************* @page -@newunit{7.8.28.2,MULTIPLY GIVING} +@newsubsubsection{MULTIPLY GIVING} @diagram{MULTIPLY GIVING,PD-MULTIPLY-2,PD-MULTIPLY-2,None} The @statement{MULTIPLY GIVING} computes the product of two literals and/or data items and saves that result in one or more other data items. @enumerate @@ -3400,7 +3400,7 @@ The optional @code{ON SIZE ERROR} and @code{NOT ON SIZE ERROR} clauses may be us @comment ** 7.8.29 OPEN ** @comment ********************************************************************* @page -@newsubsection{7.8.29,OPEN} +@newsubsection{OPEN} @diagram{OPEN,PD-OPEN,PD-OPEN,PD-OPEN} The @statement{OPEN} makes one or more files described in your program available for use. @enumerate @@ -3467,16 +3467,16 @@ The @comment ** 7.8.30 PERFORM ** @comment ********************************************************************* @page -@newsubsection{7.8.30,PERFORM} +@newsubsection{PERFORM} @menu -* 7.8.30.1: Procedural PERFORM -* 7.8.30.2: Inline PERFORM -* 7.8.30.3: VARYING +* Procedural PERFORM +* Inline PERFORM +* VARYING @end menu @comment ********************************************************************* @comment ** 7.8.30.1 Procedural PERFORM ** @comment ********************************************************************* -@newunit{7.8.30.1,Procedural PERFORM} +@newsubsubsection{Procedural PERFORM} @diagram{Procedural PERFORM,PD-PERFORM-1,PD-PERFORM-1,None} This format of the @statement{PERFORM} is used to transfer control to one or more procedures, which will return control back when complete. Execution of the procedure(s) can be done a single time, multiple times, repeatedly until a condition becomes @code{TRUE} or forever (with some way of breaking out of the control of the @code{PERFORM} or of halting program execution within the procedure(s)). @enumerate @@ -3540,14 +3540,14 @@ The optional @code{@var{VARYING-Clause}} is a mechanism that creates an advanced @comment ** 7.8.30.2 Inline PERFORM ** @comment ********************************************************************* @page -@newunit{7.8.30.2,Inline PERFORM} +@newsubsubsection{Inline PERFORM} @diagram{Inline PERFORM,PD-PERFORM-2,PD-PERFORM-2,None} This format of the @statement{PERFORM} is identical in operation to the procedural @code{PERFORM}, except for the fact that the statement(s) comprising the perform scope (@var{imperative-statement-1}) (@pxref{Imperative Statement}) are now specified in-line with the @code{PERFORM} code rather than in procedures located elsewhere within the program. @comment ********************************************************************* @comment ** 7.8.30.3 VARYING ** @comment ********************************************************************* @page -@newunit{7.8.30.3,VARYING} +@newsubsubsection{VARYING} @diagram{VARYING,PD-PERFORM-VARYING,PD-PERFORM-VARYING,None} The @code{VARYING} clause, available on both formats of the @code{PERFORM} statement, is a looping mechanism that allows for the specification of one or more numeric data items that will be initialized to a programmer-specified value and automatically incremented by another programmer-specified value after each loop iteration. @enumerate @@ -3660,15 +3660,15 @@ With this change, @code{ABCDEFGHIJKL} is once again displayed. @comment ** 7.8.31 READ ** @comment ********************************************************************* @page -@newsubsection{7.8.31,READ} +@newsubsection{READ} @menu -* 7.8.31.1: Sequential READ -* 7.8.31.2: Random READ +* Sequential READ +* Random READ @end menu @comment ********************************************************************* @comment ** 7.8.31.1 Sequential READ ** @comment ********************************************************************* -@newunit{7.8.31.1,Sequential READ} +@newsubsubsection{Sequential READ} @diagram{Sequential READ,PD-READ-1,PD-READ-1,None} This form of the @statement{READ} retrieves the next (or previous) record from a file. @enumerate @@ -3726,7 +3726,7 @@ The optional @code{NOT AT END} clause, if coded, will check for a file status va @comment ** 7.8.31.2 Random READ ** @comment ********************************************************************* @page -@newunit{7.8.31.2,Random READ} +@newsubsubsection{Random READ} @diagram{Random READ,PD-READ-2,PD-READ-2,None} This form of the @statement{READ} retrieves an arbitrary record from an @syntaxref{ORGANIZATION RELATIVE} or @syntaxref{ORGANIZATION INDEXED} file. @enumerate @@ -3794,7 +3794,7 @@ The optional @code{INVALID KEY} and @code{NOT INVALID KEY} clauses may be used t @comment ** 7.8.32 READY TRACE ** @comment ********************************************************************* @page -@newsubsection{7.8.32,READY TRACE} +@newsubsection{READY TRACE} @diagram{READY TRACE,PD-READY-TRACE,PD-READY-TRACE,None} The @statement{READY TRACE} turns procedure or procedure-and-statement tracing on. @enumerate @@ -3816,7 +3816,7 @@ The @comment ** 7.8.33 RELEASE ** @comment ********************************************************************* @page -@newsubsection{7.8.33,RELEASE} +@newsubsection{RELEASE} @diagram{RELEASE,PD-RELEASE,PD-RELEASE,None} The @statement{RELEASE} adds a new record to a sort work file. @enumerate @@ -3837,7 +3837,7 @@ The optional @comment ** 7.8.34 RESET TRACE ** @comment ********************************************************************* @page -@newsubsection{7.8.34,RESET TRACE} +@newsubsection{RESET TRACE} @diagram{RESET TRACE,PD-RESET-TRACE,PD-RESET-TRACE,None} The @statement{RESET TRACE} turns procedure or procedure-and-statement tracing off. @enumerate @@ -3860,7 +3860,7 @@ The @comment ** 7.8.35 RETURN ** @comment ********************************************************************* @page -@newsubsection{7.8.35,RETURN} +@newsubsection{RETURN} @diagram{RETURN,PD-RETURN,PD-RETURN,None} The @statement{RETURN} reads a record from a sort or merge work file. @enumerate @@ -3890,7 +3890,7 @@ The optional @code{NOT AT END} clause, if coded, will check checking for a file @comment ** 7.8.36 REWRITE ** @comment ********************************************************************* @page -@newsubsection{7.8.36,REWRITE} +@newsubsection{REWRITE} @diagram{REWRITE,PD-REWRITE,PD-REWRITE,None} The @statement{REWRITE} replaces a logical record on a disk file. @enumerate @@ -3943,7 +3943,7 @@ The optional @code{INVALID KEY} and @code{NOT INVALID KEY} clauses may be used t @comment ** 7.8.37 ROLLBACK ** @comment ********************************************************************* @page -@newsubsection{7.8.37,ROLLBACK} +@newsubsection{ROLLBACK} @diagram{ROLLBACK,PD-ROLLBACK,PD-ROLLBACK,None} The @statement{ROLLBACK} has the same effect as if an @statementref{UNLOCK} were executed against every open file in the program. @enumerate @@ -3960,7 +3960,7 @@ All locks currently being held for all open files will be released. @comment ** 7.8.38 SEARCH ** @comment ********************************************************************* @page -@newsubsection{7.8.38,SEARCH} +@newsubsection{SEARCH} @diagram{SEARCH,PD-SEARCH,PD-SEARCH,None} The @statement{SEARCH} is used to sequentially search a table, stopping either once a specific value is located within the table or when the table has been completely searched. @enumerate @@ -4009,7 +4009,7 @@ If the search index now has a value less than or equal to the number of entries @comment ** 7.8.39 SEARCH ALL ** @comment ********************************************************************* @page -@newsubsection{7.8.39,SEARCH ALL} +@newsubsection{SEARCH ALL} @diagram{SEARCH ALL,PD-SEARCH-ALL,PD-SEARCH-ALL,None} The @statement{SEARCH ALL} performs a binary, or half-interval, search against a sorted table. This is generally @i{significantly} faster than performing a sequential @code{SEARCH} of a table, especially if the table contains a large number of entries. @enumerate @@ -4098,22 +4098,22 @@ With a binary search, express the number of entries as a binary number (1,000 = @comment ** 7.8.40 SET ** @comment ********************************************************************* @page -@newsubsection{7.8.40,SET} +@newsubsection{SET} @menu -* 7.8.40.1: SET ENVIRONMENT -* 7.8.40.2: SET Program-Pointer -* 7.8.40.3: SET ADDRESS -* 7.8.40.4: SET Index -* 7.8.40.5: SET UP/DOWN -* 7.8.40.6: SET Condition Name -* 7.8.40.7: SET Switch -* 7.8.40.8: SET ATTRIBUTE -* 7.8.40.9: SET LAST EXCEPTION +* SET ENVIRONMENT +* SET Program-Pointer +* SET ADDRESS +* SET Index +* SET UP/DOWN +* SET Condition Name +* SET Switch +* SET ATTRIBUTE +* SET LAST EXCEPTION @end menu @comment ********************************************************************* @comment ** 7.8.40.1 SET ENVIRONMENT ** @comment ********************************************************************* -@newunit{7.8.40.1,SET ENVIRONMENT} +@newsubsubsection{SET ENVIRONMENT} @diagram{SET ENVIRONMENT,PD-SET-1,PD-SET-1,None} The @statement{SET ENVIRONMENT} provides a straight-forward means of setting environment values from within a program. @enumerate @@ -4142,7 +4142,7 @@ SET ENVIRONMENT "VARNAME" TO "VALUE" @comment ** 7.8.40.2 SET Program-Pointer ** @comment ********************************************************************* @page -@newunit{7.8.40.2,SET Program-Pointer} +@newsubsubsection{SET Program-Pointer} @diagram{SET Program-Pointer,PD-SET-2,PD-SET-2,None} The @statement{SET @var{Program-Pointer}} allows you to retrieve the address of a procedure division code module --- specifically the @code{PROGRAM-ID}, @code{FUNCTION-ID} or an entry-point established via the @statementref{ENTRY}. @enumerate @@ -4162,7 +4162,7 @@ Once the address of a procedure division code area has been acquired in this way @comment ** 7.8.40.3 SET ADDRESS ** @comment ********************************************************************* @page -@newunit{7.8.40.3,SET ADDRESS} +@newsubsubsection{SET ADDRESS} @diagram{SET ADDRESS,PD-SET-3,PD-SET-3,None} The @statement{SET ADDRESS} can be used to work with the addresses of data items rather than their contents. @enumerate @@ -4183,7 +4183,7 @@ If the @code{ADDRESS OF} clause is absent after the @code{TO}, the contents of @ @comment ** 7.8.40.4 SET Index ** @comment ********************************************************************* @page -@newunit{7.8.40.4,SET Index} +@newsubsubsection{SET Index} @diagram{SET Index,PD-SET-4,PD-SET-4,None} This statement assigns a value to a @code{USAGE INDEX} data item. @enumerate @@ -4197,7 +4197,7 @@ Either the @syntaxref{USAGE} of @var{index-name-1} should be @code{INDEX}, or @v @comment ** 7.8.40.5 SET UP/DOWN ** @comment ********************************************************************* @page -@newunit{7.8.40.5,SET UP/DOWN} +@newsubsubsection{SET UP/DOWN} @diagram{SET UP/DOWN,PD-SET-5,PD-SET-5,None} Use this statement to increment or decrement the value of an index or pointer by a specified amount. @enumerate @@ -4214,7 +4214,7 @@ The typical usage when @var{identifier-1} is a @code{USAGE INDEX} data item is t @comment ** 7.8.40.6 SET Condition Name ** @comment ********************************************************************* @page -@newunit{7.8.40.6,SET Condition Name} +@newsubsubsection{SET Condition Name} @diagram{SET Condition Name,PD-SET-6-Info,PD-SET-6-TeX,None} The @statement{SET @var{Condition Name}} provides one method of specifying the @code{TRUE} / @code{FALSE} value of a level-88 condition name. @enumerate @@ -4234,7 +4234,7 @@ When specifying @code{FALSE}, the value assigned to each parent data item will b @comment ** 7.8.40.7 SET Switch ** @comment ********************************************************************* @page -@newunit{7.8.40.7,SET Switch} +@newsubsubsection{SET Switch} @diagram{SET Switch,PD-SET-7-Info,PD-SET-7-TeX,None} This form of the @statement{SET} is used to turn switches on or off. @enumerate @@ -4251,7 +4251,7 @@ Switches may be tested via the @statementref{IF} and a Switch-Status Condition. @comment ** 7.8.40.8 SET ATTRIBUTE ** @comment ********************************************************************* @page -@newunit{7.8.40.8,SET ATTRIBUTE} +@newsubsubsection{SET ATTRIBUTE} @diagram{SET ATTRIBUTE,PD-SET-8,PD-SET-8,None} The @statement{SET ATTRIBUTE} may be used to modify one or more attributes of a screen section data item at run-time. @enumerate @@ -4268,7 +4268,7 @@ The attributes shown in the syntax diagram are the only ones that may be altered @comment ** 7.8.40.9 SET LAST EXCEPTION ** @comment ********************************************************************* @page -@newunit{7.8.40.9,SET LAST EXCEPTION} +@newsubsubsection{SET LAST EXCEPTION} @diagram{SET ATTRIBUTE,PD-SET-9,PD-SET-9,None} The @statement{SET LAST EXCEPTION} will set the last program exception status to indicate no exception. @enumerate @@ -4285,15 +4285,15 @@ This action resets the global exception object completely (FUNCTION EXCEPTION-@{ @comment ** 7.8.41 SORT ** @comment ********************************************************************* @page -@newsubsection{7.8.41,SORT} +@newsubsection{SORT} @menu -* 7.8.41.1: File-Based SORT -* 7.8.41.2: Table SORT +* File-Based SORT +* Table SORT @end menu @comment ********************************************************************* @comment ** 7.8.41.1 File-Based SORT ** @comment ********************************************************************* -@newunit{7.8.41.1,File-Based SORT} +@newsubsubsection{File-Based SORT} @diagram{File-Based SORT,PD-SORT-1-Info,PD-SORT-1-TeX,PD-DUPLICATES} This format of the @statement{SORT} is designed to sort large volumes of data according to one or more key fields. @enumerate @@ -4406,7 +4406,7 @@ Once the output procedure terminates, the sort is complete. @comment ** 7.8.41.2 Table SORT ** @comment ********************************************************************* @page -@newunit{7.8.41.2,Table SORT} +@newsubsubsection{Table SORT} @diagram{Table SORT,PD-SORT-2,PD-SORT-2,PD-DUPLICATES} This format of the @statement{SORT} sorts relatively small quantities of data --- namely data contained in a data division table --- according to one or more key fields. @enumerate @@ -4441,7 +4441,7 @@ Although the specification of one or more @code{KEY} clauses is optional, curren @comment ** 7.8.42 START ** @comment ********************************************************************* @page -@newsubsection{7.8.42,START} +@newsubsection{START} @diagram{START,PD-START,PD-START,None} The @statement{START} defines the logical starting point within a relative or indexed file for subsequent sequential read operations. It positions an internal logical record pointer to a particular record in the file, but does not actually transfer any of that record's data into the record buffer. @enumerate @@ -4504,7 +4504,7 @@ The optional @code{INVALID KEY} and @code{NOT INVALID KEY} clauses may be used t @comment ** 7.8.43 STOP ** @comment ********************************************************************* @page -@newsubsection{7.8.43,STOP} +@newsubsection{STOP} @diagram{STOP,PD-STOP,PD-STOP,None} The @statement{STOP} suspends program execution. Some options will allow program execution to resume while others return control to the operating system. @enumerate @@ -4573,7 +4573,7 @@ STOP RUN WITH ERROR STATUS 16 @comment ** 7.8.44 STRING ** @comment ********************************************************************* @page -@newsubsection{7.8.44,STRING} +@newsubsection{STRING} @diagram{STRING,PD-STRING,PD-STRING,None} The @statement{STRING} is used to concatenate all or a part of one or more strings together, forming a new string. @enumerate @@ -4636,16 +4636,16 @@ The optional @code{ON OVERFLOW} and @code{NOT ON OVERFLOW} clauses may be used t @comment ** 7.8.45 SUBTRACT ** @comment ********************************************************************* @page -@newsubsection{7.8.45,SUBTRACT} +@newsubsection{SUBTRACT} @menu -* 7.8.45.1: SUBTRACT FROM -* 7.8.45.2: SUBTRACT GIVING -* 7.8.45.3: SUBTRACT CORRESPONDING +* SUBTRACT FROM +* SUBTRACT GIVING +* SUBTRACT CORRESPONDING @end menu @comment ********************************************************************* @comment ** 7.8.45.1 SUBTRACT FROM ** @comment ********************************************************************* -@newunit{7.8.45.1,SUBTRACT FROM} +@newsubsubsection{SUBTRACT FROM} @diagram{SUBTRACT FROM,PD-SUBTRACT-1-Info,PD-SUBTRACT-1-TeX,None} This format of the @statement{SUBTRACT} generates the arithmetic sum of all arguments that appear before the @code{FROM} (@var{identifier-1} or @var{literal-1}) and subtracts that sum from each @var{identifier-2}. @enumerate @@ -4670,7 +4670,7 @@ The optional @code{ON SIZE ERROR} and @code{NOT ON SIZE ERROR} clauses may be us @comment ** 7.8.45.2 SUBTRACT GIVING ** @comment ********************************************************************* @page -@newunit{7.8.45.2,SUBTRACT GIVING} +@newsubsubsection{SUBTRACT GIVING} @diagram{SUBTRACT GIVING,PD-SUBTRACT-2-Info,PD-SUBTRACT-2-TeX,None} The @statement{SUBTRACT GIVING} generates the arithmetic sum of all arguments that appear before the @code{FROM} (@var{identifier-1} or @var{literal-1}), subtracts that sum from the contents of @var{identifier-2} and then replaces the contents of the identifiers listed after the @syntaxidx{GIVING} (@var{identifier-3}) with that result. @@ -4699,7 +4699,7 @@ The optional @code{ON SIZE ERROR} and @code{NOT ON SIZE ERROR} clauses may be us @comment ** 7.8.45.3 SUBTRACT CORRESPONDING ** @comment ********************************************************************* @page -@newunit{7.8.45.3,SUBTRACT CORRESPONDING} +@newsubsubsection{SUBTRACT CORRESPONDING} @diagram{SUBTRACT CORRESPONDING,PD-SUBTRACT-3,PD-SUBTRACT-3,None} The @statement{SUBTRACT CORRESPONDING} generates code equivalent to individual @code{SUBTRACT FROM} statements for corresponding matches of data items found subordinate to the two identifiers. @enumerate @@ -4724,7 +4724,7 @@ The optional @code{ON SIZE ERROR} and @code{NOT ON SIZE ERROR} clauses may be us @comment ** 7.8.46 SUPPRESS ** @comment ********************************************************************* @page -@newsubsection{7.8.46,SUPPRESS} +@newsubsection{SUPPRESS} @diagram{SUPPRESS,PD-SUPPRESS,PD-SUPPRESS,None} The @statement{SUPPRESS} causes the presentation of a report group to be suppressed. @enumerate @@ -4767,7 +4767,7 @@ Any modification to the @comment ** 7.8.47 TERMINATE ** @comment ********************************************************************* @page -@newsubsection{7.8.47,TERMINATE} +@newsubsection{TERMINATE} @diagram{TERMINATE,PD-TERMINATE,PD-TERMINATE,None} The @statement{TERMINATE} causes the processing of the specified report(s) to be completed. @enumerate @@ -4795,7 +4795,7 @@ If an @code{INITIATE} is followed by a @code{TERMINATE} with no intervening @syn @comment ** 7.8.48 TRANSFORM ** @comment ********************************************************************* @page -@newsubsection{7.8.48,TRANSFORM} +@newsubsection{TRANSFORM} @diagram{TRANSFORM,PD-TRANSFORM,PD-TRANSFORM,None} The @statement{TRANSFORM} scans a data item performing a series of mono-alphabetic substitutions, defined by the arguments before and after the @code{TO} clause. @enumerate @@ -4820,7 +4820,7 @@ This statement exists within GnuCOBOL to provide compatibility with COBOL progra @comment ** 7.8.49 UNLOCK ** @comment ********************************************************************* @page -@newsubsection{7.8.49,UNLOCK} +@newsubsection{UNLOCK} @diagram{UNLOCK,PD-UNLOCK,PD-UNLOCK,None} This statement synchronizes any as-yet unwritten file I/O buffers to the specified file (if any) and releases any record locks held for records belonging to @var{file-name-1}. @enumerate @@ -4851,7 +4851,7 @@ When using Linux and for that matter most *nix platforms, the system maintains i @comment ** 7.8.50 UNSTRING ** @comment ********************************************************************* @page -@newsubsection{7.8.50,UNSTRING} +@newsubsection{UNSTRING} @diagram{UNSTRING,PD-UNSTRING,PD-UNSTRING,None} The @statement{UNSTRING} parses a string, extracting any number of sub strings from it. @enumerate @@ -5008,7 +5008,7 @@ Bye! @comment ** 7.8.51 WRITE ** @comment ********************************************************************* @page -@newsubsection{7.8.51,WRITE} +@newsubsection{WRITE} @diagram{WRITE,PD-WRITE,PD-WRITE,None} The @statement{WRITE} writes a new record to an open file. @enumerate diff --git a/guide/8.texi b/guide/8.texi index bf1fc81..48595b8 100644 --- a/guide/8.texi +++ b/guide/8.texi @@ -1,12 +1,12 @@ @comment ********************************************************************* @comment ** 8. Functions ** @comment ********************************************************************* -@newchapter{8,Functions} +@newchapter{Functions} @menu -* 8.1: Intrinsic Functions. -* 8.2: Built-In System Subroutines. +* Intrinsic Functions. +* Built-In System Subroutines. @end menu -@newsection{8.1,Intrinsic Functions} +@newsection{Intrinsic Functions} GnuCOBOL supports a wide variety of ``intrinsic functions'' that may be used anywhere in the PROCEDURE DIVISION where a literal is allowed. For example: @example @@ -214,125 +214,125 @@ Z UTC time indicator The supported intrinsic functions are listed in the following sections, along with their syntax and usage notes. @menu -* 8.1.1: ABS -* 8.1.2: ACOS -* 8.1.3: ANNUITY -* 8.1.4: ASIN -* 8.1.5: ATAN -* 8.1.6: BIT-OF -* 8.1.7: BIT-TO-CHAR -* 8.1.8: BYTE-LENGTH -* 8.1.9: CHAR -* 8.1.10: COMBINED-DATETIME -* 8.1.11: CONCAT -* 8.1.11: CONCATENATE -* 8.1.12: CONTENT-LENGTH -* 8.1.13: CONTENT-OF -* 8.1.14: COS -* 8.1.15: CURRENCY-SYMBOL -* 8.1.16: CURRENT-DATE -* 8.1.17: DATE-OF-INTEGER -* 8.1.18: DATE-TO-YYYYMMDD -* 8.1.19: DAY-OF-INTEGER -* 8.1.20: DAY-TO-YYYYDDD -* 8.1.21: E -* 8.1.22: EXCEPTION-FILE -* 8.1.23: EXCEPTION-LOCATION -* 8.1.24: EXCEPTION-STATEMENT -* 8.1.25: EXCEPTION-STATUS -* 8.1.26: EXP -* 8.1.27: EXP10 -* 8.1.28: FACTORIAL -* 8.1.29: FORMATTED-CURRENT-DATE -* 8.1.30: FORMATTED-DATE -* 8.1.31: FORMATTED-DATETIME -* 8.1.32: FORMATTED-TIME -* 8.1.33: FRACTION-PART -* 8.1.34: HEX-OF -* 8.1.35: HEX-TO-CHAR -* 8.1.36: HIGHEST-ALGEBRAIC -* 8.1.37: INTEGER -* 8.1.38: INTEGER-OF-DATE -* 8.1.39: INTEGER-OF-DAY -* 8.1.40: INTEGER-OF-FORMATTED-DATE -* 8.1.41: INTEGER-PART -* 8.1.42: LENGTH -* 8.1.43: LENGTH-AN -* 8.1.44: LOCALE-COMPARE -* 8.1.45: LOCALE-DATE -* 8.1.46: LOCALE-TIME -* 8.1.47: LOCALE-TIME-FROM-SECONDS -* 8.1.48: LOG -* 8.1.49: LOG10 -* 8.1.50: LOWER-CASE -* 8.1.51: LOWEST-ALGEBRAIC -* 8.1.52: MAX -* 8.1.53: MEAN -* 8.1.54: MEDIAN -* 8.1.55: MIDRANGE -* 8.1.56: MIN -* 8.1.57: MOD -* 8.1.58: MODULE-CALLER-ID -* 8.1.59: MODULE-DATE -* 8.1.60: MODULE-FORMATTED-DATE -* 8.1.61: MODULE-ID -* 8.1.62: MODULE-PATH -* 8.1.63: MODULE-SOURCE -* 8.1.64: MODULE-TIME -* 8.1.65: MONETARY-DECIMAL-POINT -* 8.1.66: MONETARY-THOUSANDS-SEPARATOR -* 8.1.67: NUMERIC-DECIMAL-POINT -* 8.1.68: NUMERIC-THOUSANDS-SEPARATOR -* 8.1.69: NUMVAL -* 8.1.70: NUMVAL-C -* 8.1.70B: NUMVAL-C-2 -* 8.1.71: NUMVAL-F -* 8.1.72: ORD -* 8.1.73: ORD-MAX -* 8.1.74: ORD-MIN -* 8.1.75: PI -* 8.1.76: PRESENT-VALUE -* 8.1.77: RANDOM -* 8.1.78: RANGE -* 8.1.79: REM -* 8.1.80: REVERSE -* 8.1.81: SECONDS-FROM-FORMATTED-TIME -* 8.1.82: SECONDS-PAST-MIDNIGHT -* 8.1.83: SIGN -* 8.1.84: SIN -* 8.1.85: SQRT -* 8.1.86: STANDARD-DEVIATION -* 8.1.87: STORED-CHAR-LENGTH -* 8.1.88: SUBSTITUTE -* 8.1.89: SUBSTITUTE-CASE -* 8.1.90: SUM -* 8.1.91: TAN -* 8.1.92: TEST-DATE-YYYYMMDD -* 8.1.93: TEST-DAY-YYYYDDD -* 8.1.94: TEST-FORMATTED-DATETIME -* 8.1.95: TEST-NUMVAL -* 8.1.96: TEST-NUMVAL-C -* 8.1.97: TEST-NUMVAL-F -* 8.1.98: TRIM -* 8.1.99: UPPER-CASE -* 8.1.100: VARIANCE -* 8.1.101: WHEN-COMPILED -* 8.1.102: YEAR-TO-YYYY -* 8.1.103: BOOLEAN-OF-INTEGER -* 8.1.104: CHAR-NATIONAL -* 8.1.105: DISPLAY-OF -* 8.1.106: EXCEPTION-FILE-N -* 8.1.107: EXCEPTION-LOCATION-N -* 8.1.108: INTEGER-OF-BOOLEAN -* 8.1.109: NATIONAL-OF -* 8.1.110: STANDARD-COMPARE +* ABS +* ACOS +* ANNUITY +* ASIN +* ATAN +* BIT-OF +* BIT-TO-CHAR +* BYTE-LENGTH +* CHAR +* COMBINED-DATETIME +* CONCAT +* CONCATENATE +* CONTENT-LENGTH +* CONTENT-OF +* COS +* CURRENCY-SYMBOL +* CURRENT-DATE +* DATE-OF-INTEGER +* DATE-TO-YYYYMMDD +* DAY-OF-INTEGER +* DAY-TO-YYYYDDD +* E +* EXCEPTION-FILE +* EXCEPTION-LOCATION +* EXCEPTION-STATEMENT +* EXCEPTION-STATUS +* EXP +* EXP10 +* FACTORIAL +* FORMATTED-CURRENT-DATE +* FORMATTED-DATE +* FORMATTED-DATETIME +* FORMATTED-TIME +* FRACTION-PART +* HEX-OF +* HEX-TO-CHAR +* HIGHEST-ALGEBRAIC +* INTEGER +* INTEGER-OF-DATE +* INTEGER-OF-DAY +* INTEGER-OF-FORMATTED-DATE +* INTEGER-PART +* LENGTH +* LENGTH-AN +* LOCALE-COMPARE +* LOCALE-DATE +* LOCALE-TIME +* LOCALE-TIME-FROM-SECONDS +* LOG +* LOG10 +* LOWER-CASE +* LOWEST-ALGEBRAIC +* MAX +* MEAN +* MEDIAN +* MIDRANGE +* MIN +* MOD +* MODULE-CALLER-ID +* MODULE-DATE +* MODULE-FORMATTED-DATE +* MODULE-ID +* MODULE-PATH +* MODULE-SOURCE +* MODULE-TIME +* MONETARY-DECIMAL-POINT +* MONETARY-THOUSANDS-SEPARATOR +* NUMERIC-DECIMAL-POINT +* NUMERIC-THOUSANDS-SEPARATOR +* NUMVAL +* NUMVAL-C +* NUMVAL-C-V2 +* NUMVAL-F +* ORD +* ORD-MAX +* ORD-MIN +* PI +* PRESENT-VALUE +* RANDOM +* RANGE +* REM +* REVERSE +* SECONDS-FROM-FORMATTED-TIME +* SECONDS-PAST-MIDNIGHT +* SIGN +* SIN +* SQRT +* STANDARD-DEVIATION +* STORED-CHAR-LENGTH +* SUBSTITUTE +* SUBSTITUTE-CASE +* SUM +* TAN +* TEST-DATE-YYYYMMDD +* TEST-DAY-YYYYDDD +* TEST-FORMATTED-DATETIME +* TEST-NUMVAL +* TEST-NUMVAL-C +* TEST-NUMVAL-F +* TRIM +* UPPER-CASE +* VARIANCE +* WHEN-COMPILED +* YEAR-TO-YYYY +* BOOLEAN-OF-INTEGER +* CHAR-NATIONAL +* DISPLAY-OF +* EXCEPTION-FILE-N +* EXCEPTION-LOCATION-N +* INTEGER-OF-BOOLEAN +* NATIONAL-OF +* STANDARD-COMPARE @end menu @comment ********************************************************************* @comment ** 8.1.1 ABS ** @comment ********************************************************************* @page -@newsubsection{8.1.1,ABS} +@newsubsection{ABS} @diagram{ABS Function,FN-ABS,FN-ABS,None} This function determines and returns the absolute value of @var{number} (a numeric literal or data item) supplied as an argument. @@ -341,7 +341,7 @@ Note that @code{ABSOLUTE-VALUE} has an alias for this function. @comment ** 8.1.2 ACOS ** @comment ********************************************************************* @page -@newsubsection{8.1.2,ACOS} +@newsubsection{ACOS} @diagram{ACOS Function,FN-ACOS,FN-ACOS,None} The @code{ACOS} function determines and returns the trigonometric arc-cosine, or inverse cosine, of @var{cosine} value (a numeric literal or data item) supplied as an argument. @@ -354,7 +354,7 @@ COMPUTE @var{degrees} = ( @var{radians} * 180 ) / FUNCTION PI @comment ** 8.1.3 ANNUITY ** @comment ********************************************************************* @page -@newsubsection{8.1.3,ANNUITY} +@newsubsection{ANNUITY} @diagram{ANNUITY Function,FN-ANNUITY,FN-ANNUITY,None} This function returns a numeric value approximating the ratio of an annuity paid at @var{interest-rate} (numeric data item or literal) for each of @var{number-of-periods} (numeric data items or literals). @@ -368,7 +368,7 @@ A note for the financially challenged: an annuity is basically a reverse loan; a @comment ** 8.1.4 ASIN ** @comment ********************************************************************* @page -@newsubsection{8.1.4,ASIN} +@newsubsection{ASIN} @diagram{ASIN Function,FN-ASIN,FN-ASIN,None} The @code{ASIN} function determines and returns the trigonometric arc-sine, or inverse sine, of @var{sine} value (a numeric literal or data item) supplied as an argument. @@ -381,7 +381,7 @@ COMPUTE @var{degrees} = ( @var{radians} * 180 ) / FUNCTION PI @comment ** 8.1.5 ATAN ** @comment ********************************************************************* @page -@newsubsection{8.1.5,ATAN} +@newsubsection{ATAN} @diagram{ATAN Function,FN-ATAN,FN-ATAN,None} Use this function to determine and return the trigonometric arc-tangent, or inverse tangent, of @var{tangent} value (a numeric literal or data item) supplied as an argument. @@ -394,7 +394,7 @@ COMPUTE @var{degrees} = ( @var{radians} * 180 ) / FUNCTION PI @comment ** 8.1.6 BIT-OF ** @comment ********************************************************************* @page -@newsubsection{8.1.6,BIT-OF} +@newsubsection{BIT-OF} @diagram{BIT-OF Function,FN-BIT-OF,FN-BIT-OF,None} @code{BIT-OF} function returns an alphanumeric character string of '1' and '0' characters, which represents the binary value of each byte in the argument used on input. @enumerate @@ -452,7 +452,7 @@ Produces : @comment ** 8.1.7 BIT-TO-CHAR ** @comment ********************************************************************* @page -@newsubsection{8.1.7,BIT-TO-CHAR} +@newsubsection{BIT-TO-CHAR} @diagram{BIT-TO-CHAR Function,FN-BIT-TO-CHAR,FN-BIT-TO-CHAR,None} @code{BIT-TO-CHAR} function returns a character string that represents a bit pattern supplied on input. @enumerate @@ -511,7 +511,7 @@ Produces: @comment ** 8.1.8 BYTE-LENGTH ** @comment ********************************************************************* @page -@newsubsection{8.1.8,BYTE-LENGTH} +@newsubsection{BYTE-LENGTH} @diagram{BYTE-LENGTH Function,FN-BYTE-LENGTH,FN-BYTE-LENGTH,None} @code{BYTE-LENGTH} returns the length --- in bytes --- of @var{string} (a group item, @code{USAGE DISPLAY} elementary item or alphanumeric literal). This intrinsic function is identical to the @syntaxref{LENGTH-AN} function. Note that the value returned by this function is not necessarily the number of @i{characters} comprising @var{string}, but rather the number of actual @i{bytes} required to store it. @@ -522,7 +522,7 @@ Contrast this with the @syntaxref{LENGTH} function. @comment ** 8.1.9 CHAR ** @comment ********************************************************************* @page -@newsubsection{8.1.9,CHAR} +@newsubsection{CHAR} @diagram{CHAR Function,FN-CHAR,FN-CHAR,None} This function returns the character in the ordinal position specified by @var{integer} (a numeric integer literal or data item with a value of 1 or greater) from the @syntaxrefalt{COLLATING SEQUENCE,OBJECT-COMPUTER} being used by the program. @@ -544,7 +544,7 @@ The @code{Char-Value} item now has the corresponding @sc{ASCII} character value. @comment ** 8.1.10 COMBINED-DATETIME ** @comment ********************************************************************* @page -@newsubsection{8.1.10,COMBINED-DATETIME} +@newsubsection{COMBINED-DATETIME} @diagram{COMBINED-DATETIME Function,FN-COMBINED-DATETIME,FN-COMBINED-DATETIME,None} This function returns a 12-digit numeric result, the first seven digits of which are the integer value of @var{days} argument (a numeric data item or literal) and the last five of which are the integer value of @var{seconds} argument (also a numeric data item or literal). @@ -570,7 +570,7 @@ Given the integer date form value "143951", which represents the date 15 Februar @comment ** 8.1.11 CONCAT ** @comment ********************************************************************* @page -@newsubsection{8.1.11,CONCAT} +@newsubsection{CONCAT} @diagram{CONCAT Function,FN-CONCATENATE,FN-CONCATENATE,None} This function concatenates the @var{argument-1}, @var{argument-2}, @dots{} (group items, @code{USAGE DISPLAY} elementary items and/or alphanumeric literals) together into a single string result. @@ -580,7 +580,7 @@ If a numeric literal or @code{PIC 9} identifier is specified as an argument, dec @comment ** 8.1.11 CONCATENATE ** @comment ********************************************************************* @page -@newsubsection{8.1.11,CONCATENATE} +@newsubsection{CONCATENATE} @diagram{CONCATENATE Function,FN-CONCATENATE,FN-CONCATENATE,None} This function concatenates the @var{string-1}, @var{string-2}, @dots{} (group items, @code{USAGE DISPLAY} elementary items and/or alphanumeric literals) together into a single string result. @@ -592,7 +592,7 @@ CONCATENATE is a GnuCOBOL extention BUT also see the ISO standard CONCAT functio @comment ** 8.1.12 CONTENT-LENGTH ** @comment ********************************************************************* @page -@newsubsection{8.1.12,CONTENT-LENGTH} +@newsubsection{CONTENT-LENGTH} @diagram{CONTENT-LENGTH Function,FN-CONTENT-LENGTH,FN-CONTENT-LENGTH,None} Scans for a NUL byte delimiter of the data starting at address in given pointer, and returns the length. The NUL byte is not included in the count. An EC-DATA-PTR-NUL exception is set to exist if the pointer is NUL, and a zero length is returned. @@ -614,7 +614,7 @@ Example: @comment ** 8.1.13 CONTENT-OF ** @comment ********************************************************************* @page -@newsubsection{8.1.13,CONTENT-OF} +@newsubsection{CONTENT-OF} @diagram{CONTENT-OF Function,FN-CONTENT-OF,FN-CONTENT-OF,None} Takes a pointer and optional length. Returns a character field of the data addressed by the pointer, either up to a NUL byte or to the given length. @@ -633,7 +633,7 @@ Function CONTENT-OF is a GnuCOBOL extention. @comment ** 8.1.14 COS ** @comment ********************************************************************* @page -@newsubsection{8.1.14,COS} +@newsubsection{COS} @diagram{COS Function,FN-COS,FN-COS,None} The @code{COS} function determines and returns the trigonometric cosine of @var{angle} (a numeric literal or data item) supplied as an argument. @@ -646,7 +646,7 @@ COMPUTE @var{radians} = ( @var{degrees} * FUNCTION PI) / 180 @comment ** 8.1.15 CURRENCY-SYMBOL ** @comment ********************************************************************* @page -@newsubsection{8.1.15,CURRENCY-SYMBOL} +@newsubsection{CURRENCY-SYMBOL} @diagram{CURRENCY-SYMBOL Function,FN-CURRENCY-SYMBOL,FN-CURRENCY-SYMBOL,None} The @code{CURRENCY-SYMBOL} function returns the currency symbol character currently in effect for the locale under which your program is running. On UNIX systems, your locale is established via the @envvarruntimeref{LANG} environment variable. On Windows, the Control Panel's "Regional and Language Options" define the locale. @@ -656,7 +656,7 @@ Changing the currency symbol via the @syntaxref{SPECIAL-NAMES} paragraph's @code @comment ** 8.1.16 CURRENT-DATE ** @comment ********************************************************************* @page -@newsubsection{8.1.16,CURRENT-DATE} +@newsubsection{CURRENT-DATE} @diagram{CURRENT-DATE Function,FN-CURRENT-DATE,FN-CURRENT-DATE,None} Returns the current date and time as the following 21-character structure: @@ -679,7 +679,7 @@ Since this function has no arguments, no parenthesis should be specified. @comment ** 8.1.17 DATE-OF-INTEGER ** @comment ********************************************************************* @page -@newsubsection{8.1.17,DATE-OF-INTEGER} +@newsubsection{DATE-OF-INTEGER} @diagram{DATE-OF-INTEGER Function,FN-DATE-OF-INTEGER,FN-DATE-OF-INTEGER,None} This function returns a numeric calendar date in @i{yyyymmdd} (i.e. Gregorian) format. The date is determined by adding the number of days specified as @var{integer} (a numeric integer data item or literal) to the date December 31, 1600. For example, @code{DATE-OF-INTEGER(1)} returns 16010101 while @code{DATE-OF-INTEGER(150000)} returns 20110908. @@ -688,7 +688,7 @@ A value less than 1 or greater than 3067671 (9999/12/31) will return a result of @comment ** 8.1.18 DATE-TO-YYYYMMDD ** @comment ********************************************************************* @page -@newsubsection{8.1.18,DATE-TO-YYYYMMDD} +@newsubsection{DATE-TO-YYYYMMDD} @diagram{DATE-TO-YYYYMMDD Function,FN-DATE-TO-YYYYMMDD,FN-DATE-TO-YYYYMMDD,None} You can use this function to convert the six-digit Gregorian date specified as @var{yymmdd} (a numeric integer data item or literal) to an eight-digit format (@i{yyyymmdd}). @@ -699,7 +699,7 @@ The optional @var{yy-execution-time} argument (a numeric integer data item or li @comment ** 8.1.19 DAY-OF-INTEGER ** @comment ********************************************************************* @page -@newsubsection{8.1.19,DAY-OF-INTEGER} +@newsubsection{DAY-OF-INTEGER} @diagram{DAY-OF-INTEGER Function,FN-DAY-OF-INTEGER,FN-DAY-OF-INTEGER,None} This function returns a calendar date in yyyyddd (i.e. Julian) format. The date is determined by adding the number of days specified as integer (a numeric integer data item or literal) to December 31, 1600. For example, @code{DAY-OF-INTEGER(1)} returns 1601001 while @code{DAY-OF-INTEGER(250000)} returns 2011251. @@ -708,7 +708,7 @@ A value less than 1 or greater than 3067671 (9999/12/31) will return a result of @comment ** 8.1.20 DAY-TO-YYYYDDD ** @comment ********************************************************************* @page -@newsubsection{8.1.20,DAY-TO-YYYYDDD} +@newsubsection{DAY-TO-YYYYDDD} @diagram{DAY-TO-YYYYDDD Function,FN-DAY-TO-YYYYDDD,FN-DAY-TO-YYYYDDD,None} You can use this function to convert the five-digit Julian date specified as @var{yyddd} (a numeric integer data item or literal) to a seven-digit numeric Julian format (yyyyddd). @@ -719,7 +719,7 @@ The optional @var{yy-execution-time} argument (a numeric integer data item or li @comment ** 8.1.21 E ** @comment ********************************************************************* @page -@newsubsection{8.1.21,E} +@newsubsection{E} @diagram{E Function,FN-E,FN-E,None} This function returns the mathematical constant @i{E} (the base of natural logarithms). The maximum precision with which this value may be returned is 2.7182818284590452353602874713526625. @@ -728,7 +728,7 @@ Since this function has no arguments, no parenthesis should be specified. @comment ** 8.1.22 EXCEPTION-FILE ** @comment ********************************************************************* @page -@newsubsection{8.1.22,EXCEPTION-FILE} +@newsubsection{EXCEPTION-FILE} @diagram{EXCEPTION-FILE Function,FN-EXCEPTION-FILE,FN-EXCEPTION-FILE,None} This function returns I/O exception information from the most-recently executed input or output statement. The information is returned as a 34-character string, where the first two characters are the two-digit file status value (@pxref{File Status Codes}) and the remaining 32 are the @var{file-name-1} specification from the file's @syntaxref{SELECT} statement. @@ -741,7 +741,7 @@ The documentation of the @subpgmref{CBL_ERROR_PROC} built-in subroutine illustra @comment ** 8.1.23 EXCEPTION-LOCATION ** @comment ********************************************************************* @page -@newsubsection{8.1.23,EXCEPTION-LOCATION} +@newsubsection{EXCEPTION-LOCATION} @diagram{EXCEPTION-LOCATION Function,FN-EXCEPTION-LOCATION,FN-EXCEPTION-LOCATION,None} This function returns exception information from the most-recently failing statement. The information is returned to a 1023 character string in one of the following formats, depending on the nature of the failure: @itemize @bullet @@ -771,7 +771,7 @@ The documentation of the @subpgmref{CBL_ERROR_PROC} built-in subroutine illustra @comment ** 8.1.24 EXCEPTION-STATEMENT ** @comment ********************************************************************* @page -@newsubsection{8.1.24,EXCEPTION-STATEMENT} +@newsubsection{EXCEPTION-STATEMENT} @diagram{EXCEPTION-STATEMENT Function,FN-EXCEPTION-STMT,FN-EXCEPTION-STMT,None} This function returns the most-recent COBOL statement that generated an exception condition. @@ -787,7 +787,7 @@ The documentation of the @subpgmref{CBL_ERROR_PROC} built-in subroutine illustra @comment ** 8.1.25 EXCEPTION-STATUS ** @comment ********************************************************************* @page -@newsubsection{8.1.25,EXCEPTION-STATUS} +@newsubsection{EXCEPTION-STATUS} @diagram{EXCEPTION-STATUS Function,FN-EXCEPTION-STATUS,FN-EXCEPTION-STATUS,None} This function returns the error type (a text string --- see column 2 of the upcoming table for the possible values) from the most-recent COBOL statement that generated an exception condition. @@ -889,28 +889,28 @@ The following are the error type strings, and their corresponding exception code @comment ** 8.1.26 EXP ** @comment ********************************************************************* @page -@newsubsection{8.1.26,EXP} +@newsubsection{EXP} @diagram{EXP Function,FN-EXP,FN-EXP,None} Computes and returns the value of the mathematical constant @i{e} raised to the power specified by @var{number} (a numeric literal or data item). @comment ********************************************************************* @comment ** 8.1.27 EXP10 ** @comment ********************************************************************* @page -@newsubsection{8.1.27,EXP10} +@newsubsection{EXP10} @diagram{EXP10 Function,FN-EXP10,FN-EXP10,None} Computes and returns the value of 10 raised to the power specified by @var{number} (a numeric literal or data item). @comment ********************************************************************* @comment ** 8.1.28 FACTORIAL ** @comment ********************************************************************* @page -@newsubsection{8.1.28,FACTORIAL} +@newsubsection{FACTORIAL} @diagram{FACTORIAL Function,FN-FACTORIAL,FN-FACTORIAL,None} This function computes and returns the factorial value of @var{number} (a numeric literal or data item). @comment ********************************************************************* @comment ** 8.1.29 FORMATTED-CURRENT-DATE ** @comment ********************************************************************* @page -@newsubsection{8.1.29,FORMATTED-CURRENT-DATE} +@newsubsection{FORMATTED-CURRENT-DATE} @diagram{FORMATTED-CURRENT-DATE Function,FN-FORMATTED-CURRENT-DATE,FN-FORMATTED-CURRENT-DATE,None} @code{FORMATTED-CURRENT-DATE} returns the current date and time provided by the system at run-time, formatted according to date-and-time-format according to the argument type. @@ -923,7 +923,7 @@ The returned value is formatted to the same form as @var{argument-1}. @comment ** 8.1.30 FORMATTED-DATE ** @comment ********************************************************************* @page -@newsubsection{8.1.30,FORMATTED-DATE} +@newsubsection{FORMATTED-DATE} @diagram{FORMATTED-DATE Function,FN-FORMATTED-DATE,FN-FORMATTED-DATE,None} @code{FORMATTED-DATE} uses a format to convert a date in integer date form to a date in the requested format. The returned value will be in date format. @@ -938,7 +938,7 @@ Given the date format "YYYYMMDD" and the value "143951", which represents the da @comment ** 8.1.31 FORMATTED-DATETIME ** @comment ********************************************************************* @page -@newsubsection{8.1.31,FORMATTED-DATETIME} +@newsubsection{FORMATTED-DATETIME} @diagram{FORMATTED-DATETIME Function,FN-FORMATTED-DATETIME,FN-FORMATTED-DATETIME,None} @code{FORMATTED-DATETIME} uses a combined time and date form to convert and combine a date in integer form and a numeric time expressed as seconds past midnight in UTC. See Date and Time Formats for details. @@ -969,7 +969,7 @@ If the first argument has the format "YYMMDDThhmmss.ss+hhmm", the second argumen @comment ** 8.1.32 FORMATTED-TIME ** @comment ********************************************************************* @page -@newsubsection{8.1.32,FORMATTED-TIME} +@newsubsection{FORMATTED-TIME} @diagram{FORMATTED-TIME Function,FN-FORMATTED-TIME,FN-FORMATTED-TIME,None} @code{FORMATTED-TIME} converts a value representing seconds past midnight formatted time of day with optional offset. @@ -998,7 +998,7 @@ If the first argument has the format "hhmmss.ss+hhmm", the second argument the v @comment ** 8.1.33 FRACTION-PART ** @comment ********************************************************************* @page -@newsubsection{8.1.33,FRACTION-PART} +@newsubsection{FRACTION-PART} @diagram{FRACTION-PART Function,FN-FRACTION-PART,FN-FRACTION-PART,None} This function returns that portion of @var{number} (a numeric data item or a numeric literal) that occurs to the right of the decimal point. @code{FRACTION-PART(3.1415)}, for example, returns a value of 0.1415. This function is equivalent to the expression: @@ -1019,7 +1019,7 @@ When moved to a variable, it MUST have a preceding 'V' in the PICTURE, i.e., PIC @comment ** 8.1.34 HEX-OF ** @comment ****************************************************************** @page -@newsubsection{8.1.34,HEX-OF} +@newsubsection{HEX-OF} @diagram{HEX-OF Function,FN-HEX-OF,FN-HEX-OF,None} @code{HEX-OF} function returns an alphanumeric character string consisting of a hexadecimal representation of the argument used on input. @enumerate @@ -1042,7 +1042,7 @@ The length of the character string returned, in bytes, is twice the length of @v @comment ** 8.1.35 HEX-TO-CHAR ** @comment ****************************************************************** @page -@newsubsection{8.1.35,HEX-TO-CHAR} +@newsubsection{HEX-TO-CHAR} @diagram{HEX-TO-CHAR Function,FN-HEX-TO-CHAR,FN-HEX-TO-CHAR,None} @code{HEX-TO-CHAR} function returns a character string that represents the hexadecimal digit characters supplied on input. @enumerate @@ -1069,21 +1069,21 @@ The length of the result string is equal to the length of the input string divid @comment ** 8.1.36 HIGHEST-ALGEBRAIC ** @comment ********************************************************************* @page -@newsubsection{8.1.36,HIGHEST-ALGEBRAIC} +@newsubsection{HIGHEST-ALGEBRAIC} @diagram{HIGHEST-ALGEBRAIC Function,FN-HIGHEST-ALGEBRAIC,FN-HIGHEST-ALGEBRAIC,None} This function returns the highest (i.e. largest or farthest away from 0 in a positive direction if @var{numeric-identifier} is signed) value that could possibly be stored in @var{numeric-identifier}. @comment ********************************************************************* @comment ** 8.1.37 INTEGER ** @comment ********************************************************************* @page -@newsubsection{8.1.37,INTEGER} +@newsubsection{INTEGER} @diagram{INTEGER Function,FN-INTEGER,FN-INTEGER,None} The @code{INTEGER} function returns the greatest integer value that is less than or equal to @var{number} (a numeric literal or data item). @comment ********************************************************************* @comment ** 8.1.38 INTEGER-OF-DATE ** @comment ********************************************************************* @page -@newsubsection{8.1.38,INTEGER-OF-DATE} +@newsubsection{INTEGER-OF-DATE} @diagram{INTEGER-OF-DATE Function,FN-INTEGER-OF-DATE,FN-INTEGER-OF-DATE,None} This function converts @var{date} (a numeric integer data item or literal) --- presumed to be a Gregorian calendar form standard date (YYYYMMDD) --- to internal date form (the number of days that have transpired since 1600/12/31). @@ -1092,7 +1092,7 @@ Once in that form, mathematical operations may be performed against the internal @comment ** 8.1.39 INTEGER-OF-DAY ** @comment ********************************************************************* @page -@newsubsection{8.1.39,INTEGER-OF-DAY} +@newsubsection{INTEGER-OF-DAY} @diagram{INTEGER-OF-DAY Function,FN-INTEGER-OF-DAY,FN-INTEGER-OF-DAY,None} This function converts @var{date} (a numeric integer data item or literal) --- presumed to be a Julian calendar form standard date (YYYYDDD) --- to internal date form (the number of days that have transpired since 1600/12/31). @@ -1101,7 +1101,7 @@ Once in that form, mathematical operations may be performed against the internal @comment ** 8.1.40 INTEGER-OF-FORMATTED-DATE ** @comment ********************************************************************* @page -@newsubsection{8.1.40,INTEGER-OF-FORMATTED-DATE} +@newsubsection{INTEGER-OF-FORMATTED-DATE} @diagram{INTEGER-OF-FORMATTED-DATE Function,FN-INTEGER-OF-FORMATTED-DATE,FN-INTEGER-OF-FORMATTED-DATE,None} @code{INTEGER-OF-FORMATTED-DATE} converts a date that is in specified format to integer date form. @@ -1116,14 +1116,14 @@ If @var{argument-1} is a combined date and time format, the content of @var{argu @comment ** 8.1.41 INTEGER-PART ** @comment ********************************************************************* @page -@newsubsection{8.1.41,INTEGER-PART} +@newsubsection{INTEGER-PART} @diagram{INTEGER-PART Function,FN-INTEGER-PART,FN-INTEGER-PART,None} Returns the integer portion of @var{number} (a numeric literal or data item). @comment ********************************************************************* @comment ** 8.1.42 LENGTH ** @comment ********************************************************************* @page -@newsubsection{8.1.42,LENGTH} +@newsubsection{LENGTH} @diagram{LENGTH Function,FN-LENGTH,FN-LENGTH,None} Returns the length --- in characters --- of @var{string} (a group item, @code{USAGE DISPLAY} elementary item or alphanumeric literal). @@ -1134,7 +1134,7 @@ Contrast this function with the @syntaxref{BYTE-LENGTH} and @syntaxref{LENGTH-AN @comment ** 8.1.43 LENGTH-AN ** @comment ********************************************************************* @page -@newsubsection{8.1.43,LENGTH-AN} +@newsubsection{LENGTH-AN} @diagram{LENGTH-AN Function,FN-LENGTH-AN,FN-LENGTH-AN,None} This function returns the length --- in bytes of storage --- of @var{string} (a group item, @code{USAGE DISPLAY} elementary item or alphanumeric literal). @@ -1147,7 +1147,7 @@ Contrast this with the @syntaxref{LENGTH} function. @comment ** 8.1.44 LOCALE-COMPARE ** @comment ********************************************************************* @page -@newsubsection{8.1.44,LOCALE-COMPARE} +@newsubsection{LOCALE-COMPARE} @diagram{LOCALE-COMPARE Function,FN-LOCALE-COMPARE,FN-LOCALE-COMPARE,None} The @code{LOCALE-COMPARE} function returns a character indicating the result of comparing @var{argument-1} and @var{argument-2} using a culturally-preferred ordering defined by a @var{locale}. @@ -1171,7 +1171,7 @@ The two arguments will be compared, character by character, against each other u @comment ** 8.1.45 LOCALE-DATE ** @comment ********************************************************************* @page -@newsubsection{8.1.45,LOCALE-DATE} +@newsubsection{LOCALE-DATE} @diagram{LOCALE-DATE Function,FN-LOCALE-DATE,FN-LOCALE-DATE,None} Converts the eight-digit Gregorian @var{date} (a numeric integer data item or literal) from yyyymmdd format to the format appropriate to the current locale. On a Windows system, this will be the ``short date'' format as set using Control Panel. @@ -1180,7 +1180,7 @@ You may include an optional second argument to specify the @var{locale} name (gr @comment ** 8.1.46 LOCALE-TIME ** @comment ********************************************************************* @page -@newsubsection{8.1.46,LOCALE-TIME} +@newsubsection{LOCALE-TIME} @diagram{LOCALE-TIME Function,FN-LOCALE-TIME,FN-LOCALE-TIME,None} Converts the four- (hhmm) or six-digit (hhmmss) @var{time} (a numeric integer data item or literal) to a format appropriate to the current locale. On a Windows system, this will be the ``time'' format as set using Control Panel. @@ -1189,7 +1189,7 @@ You may include an optional @var{locale} name (a group item or @code{PIC X} iden @comment ** 8.1.47 LOCALE-TIME-FROM-SECONDS ** @comment ********************************************************************* @page -@newsubsection{8.1.47,LOCALE-TIME-FROM-SECONDS} +@newsubsection{LOCALE-TIME-FROM-SECONDS} @diagram{LOCALE-TIME-FROM-SECONDS Function,FN-LOC-TM-FROM-SECS,FN-LOC-TM-FROM-SECS,None} Converts the number of @var{seconds} since midnight (a numeric integer data item or literal) to a format appropriate to the current locale. On a Windows system, this will be the ``time'' format as set using Control Panel. @@ -1200,21 +1200,21 @@ You may include an optional @var{locale} name (a group item or @code{PIC X} iden @comment ** 8.1.48 LOG ** @comment ********************************************************************* @page -@newsubsection{8.1.48,LOG} +@newsubsection{LOG} @diagram{LOG Function,FN-LOG,FN-LOG,None} Computes and returns the natural logarithm (base @i{e}) of @var{number} (a numeric literal or data item). @comment ********************************************************************* @comment ** 8.1.49 LOG10 ** @comment ********************************************************************* @page -@newsubsection{8.1.49,LOG10} +@newsubsection{LOG10} @diagram{LOG10 Function,FN-LOG10,FN-LOG10,None} Computes and returns the base 10 logarithm of @var{number} (a numeric literal or data item). @comment ********************************************************************* @comment ** 8.1.50 LOWER-CASE ** @comment ********************************************************************* @page -@newsubsection{8.1.50,LOWER-CASE} +@newsubsection{LOWER-CASE} @diagram{LOWER-CASE Function,FN-LOWER-CASE,FN-LOWER-CASE,None} This function returns the value of @var{string} (a group item, @code{USAGE DISPLAY} elementary item or alphanumeric literal), converted entirely to lower case. @@ -1223,56 +1223,56 @@ What constitutes a ``letter'' (or upper/lower case too, for that manner) may be @comment ** 8.1.51 LOWEST-ALGEBRAIC ** @comment ********************************************************************* @page -@newsubsection{8.1.51,LOWEST-ALGEBRAIC} +@newsubsection{LOWEST-ALGEBRAIC} @diagram{LOWEST-ALGEBRAIC Function,FN-LOWEST-ALGEBRAIC,FN-LOWEST-ALGEBRAIC,None} This function returns the lowest (i.e. smallest or farthest away from 0 in a negative direction if @var{numeric-identifier} is signed) value that could possibly be stored in @var{numeric-identifier}. @comment ********************************************************************* @comment ** 8.1.52 MAX ** @comment ********************************************************************* @page -@newsubsection{8.1.52,MAX} +@newsubsection{MAX} @diagram{MAX Function,FN-MAX,FN-MAX,None} This function returns the maximum value from the specified list of numbers (each @var{number-n} may be a numeric data item or a numeric literal). @comment ********************************************************************* @comment ** 8.1.53 MEAN ** @comment ********************************************************************* @page -@newsubsection{8.1.53,MEAN} +@newsubsection{MEAN} @diagram{MEAN Function,FN-MEAN,FN-MEAN,None} This function returns the statistical mean value of the specified list of numbers (each @var{number-n} may be a numeric data item or a numeric literal). @comment ********************************************************************* @comment ** 8.1.54 MEDIAN ** @comment ********************************************************************* @page -@newsubsection{8.1.54,MEDIAN} +@newsubsection{MEDIAN} @diagram{MEDIAN Function,FN-MEDIAN,FN-MEDIAN,None} This function returns the statistical median value of the specified list of numbers (each @var{number-n} may be a numeric data item or a numeric literal). @comment ********************************************************************* @comment ** 8.1.55 MIDRANGE ** @comment ********************************************************************* @page -@newsubsection{8.1.55,MIDRANGE} +@newsubsection{MIDRANGE} @diagram{MIDRANGE Function,FN-MIDRANGE,FN-MIDRANGE,None} The @code{MIDRANGE} (middle range) function returns a numeric value that is the arithmetic mean (average) of the values of the minimum and maximum numbers from the supplied list. Each @var{number-n} may be a numeric data items or a numeric literal. @comment ********************************************************************* @comment ** 8.1.56 MIN ** @comment ********************************************************************* @page -@newsubsection{8.1.56,MIN} +@newsubsection{MIN} @diagram{MIN Function,FN-MIN,FN-MIN,None} This function returns the minimum value from the specified list of numbers (each @var{number-n} may be a numeric data item or a numeric literal). @comment ********************************************************************* @comment ** 8.1.57 MOD ** @comment ********************************************************************* @page -@newsubsection{8.1.57,MOD} +@newsubsection{MOD} @diagram{MOD Function,FN-MOD,FN-MOD,None} This function returns the value of @var{value} modulo @var{modulus} (essentially the remainder from the division of @var{value} by @var{modulus}). Both arguments may be numeric data items or numeric literals. Either (or both) may have a non-integer value. @comment ********************************************************************* @comment ** 8.1.58 MODULE-CALLER-ID ** @comment ********************************************************************* @page -@newsubsection{8.1.58,MODULE-CALLER-ID} +@newsubsection{MODULE-CALLER-ID} @diagram{MODULE-CALLER-ID Function,FN-MODULE-CALLER-ID,FN-MODULE-CALLER-ID,None} This function returns the null string if it is executed within a main program. When executed with a subprogram, it returns the entry-point name of the program that called the subprogram. @@ -1283,7 +1283,7 @@ Since this function has no arguments, no parenthesis should be specified. @comment ** 8.1.59 MODULE-DATE ** @comment ********************************************************************* @page -@newsubsection{8.1.59,MODULE-DATE} +@newsubsection{MODULE-DATE} @diagram{MODULE-DATE Function,FN-MODULE-DATE,FN-MODULE-DATE,None} This function Returns the date the GnuCOBOL program that is executing the function was compiled, in the form yyyymmdd. @@ -1294,7 +1294,7 @@ Since this function has no arguments, no parenthesis should be specified. @comment ** 8.1.60 MODULE-FORMATTED-DATE ** @comment ********************************************************************* @page -@newsubsection{8.1.60,MODULE-FORMATTED-DATE} +@newsubsection{MODULE-FORMATTED-DATE} @diagram{MODULE-FORMATTED-DATE Function,FN-MODULE-FMTD-DATE,FN-MODULE-FMTD-DATE,None} This function returns the fully-formatted date and time when the program executing the function was compiled. The exact format of this returned string value may vary depending on the operating system and GnuCOBOL build type. @@ -1305,7 +1305,7 @@ Since this function has no arguments, no parenthesis should be specified. @comment ** 8.1.61 MODULE-ID ** @comment ********************************************************************* @page -@newsubsection{8.1.61,MODULE-ID} +@newsubsection{MODULE-ID} @diagram{MODULE-ID Function,FN-MODULE-ID,FN-MODULE-ID,None} This function returns the primary entry-point name (i.e. the @code{PROGRAM-ID} or @code{FUNCTION-ID} of the program. @xref{IDENTIFICATION DIVISION}, for information on those clauses. @@ -1316,7 +1316,7 @@ Since this function has no arguments, no parenthesis should be specified. @comment ** 8.1.62 MODULE-PATH ** @comment ********************************************************************* @page -@newsubsection{8.1.62,MODULE-PATH} +@newsubsection{MODULE-PATH} @diagram{MODULE-PATH Function,FN-MODULE-PATH,FN-MODULE-PATH,None} This function returns the full path to the executable version of this GnuCOBOL program. The filename component of this value will be exactly as typed on the command line, down to the use of upper- and lower-case letters and presence (or absence) of any extension. @@ -1327,7 +1327,7 @@ Since this function has no arguments, no parenthesis should be specified. @comment ** 8.1.63 MODULE-SOURCE ** @comment ********************************************************************* @page -@newsubsection{8.1.63,MODULE-SOURCE} +@newsubsection{MODULE-SOURCE} @diagram{MODULE-SOURCE Function,FN-MODULE-SOURCE,FN-MODULE-SOURCE,None} The filename of the source code of the program (as specified on the @command{cobc} command when the program was compiled) is returned by this function. @@ -1338,7 +1338,7 @@ Since this function has no arguments, no parenthesis should be specified. @comment ** 8.1.64 MODULE-TIME ** @comment ********************************************************************* @page -@newsubsection{8.1.64,MODULE-TIME} +@newsubsection{MODULE-TIME} @diagram{MODULE-TIME Function,FN-MODULE-TIME,FN-MODULE-TIME,None} This function returns the time the GnuCOBOL program was compiled, in the form hhmmss. @@ -1381,7 +1381,7 @@ MODULE-TIME = [124314] @comment ** 8.1.65 MONETARY-DECIMAL-POINT ** @comment ********************************************************************* @page -@newsubsection{8.1.65,MONETARY-DECIMAL-POINT} +@newsubsection{MONETARY-DECIMAL-POINT} @diagram{MONETARY-DECIMAL-POINT Function,FN-MON-DECIMAL-POINT,FN-MON-DECIMAL-POINT,None} @code{MONETARY-DECIMAL-POINT} returns the character used to separate the integer portion from the fractional part of a monetary currency value according to the rules currently in effect for the locale under which your program is running. @@ -1395,7 +1395,7 @@ Since this function has no arguments, no parenthesis should be specified. @comment ** 8.1.66 MONETARY-THOUSANDS-SEPARATOR ** @comment ********************************************************************* @page -@newsubsection{8.1.66,MONETARY-THOUSANDS-SEPARATOR} +@newsubsection{MONETARY-THOUSANDS-SEPARATOR} @diagram{MONETARY-THOUSANDS-SEPARATOR Function,FN-MON-THOUSANDS-SEP,FN-MON-THOUSANDS-SEP,None} This function returns the character used to separate the thousands digit groupings of monetary currency values according to the rules currently in effect for the locale under which your program is running. @@ -1409,7 +1409,7 @@ Since this function has no arguments, no parenthesis should be specified. @comment ** 8.1.67 NUMERIC-DECIMAL-POINT ** @comment ********************************************************************* @page -@newsubsection{8.1.67,NUMERIC-DECIMAL-POINT} +@newsubsection{NUMERIC-DECIMAL-POINT} @diagram{NUMERIC-DECIMAL-POINT Function,FN-NUM-DECIMAL-POINT,FN-NUM-DECIMAL-POINT,None} This function returns the character used to separate the integer portion of a non-integer numeric item from the fractional part according to the rules currently in effect for the locale under which your program is running. @@ -1423,7 +1423,7 @@ Since this function has no arguments, no parenthesis should be specified. @comment ** 8.1.68 NUMERIC-THOUSANDS-SEPARATOR ** @comment ********************************************************************* @page -@newsubsection{8.1.68,NUMERIC-THOUSANDS-SEPARATOR} +@newsubsection{NUMERIC-THOUSANDS-SEPARATOR} @diagram{NUMERIC-THOUSANDS-SEPARATOR Function,FN-NUM-THOUSANDS-SEP,FN-NUM-THOUSANDS-SEP,None} This function returns the character used to separate the thousands digit groupings of numeric values according to the rules currently in effect for the locale under which your program is running. @@ -1437,7 +1437,7 @@ Since this function has no arguments, no parenthesis should be specified. @comment ** 8.1.69 NUMVAL ** @comment ********************************************************************* @page -@newsubsection{8.1.69,NUMVAL} +@newsubsection{NUMVAL} @diagram{NUMVAL Function,FN-NUMVAL,FN-NUMVAL,None} The @code{NUMVAL} function converts a @var{string} (a group item, @code{USAGE DISPLAY} elementary item or alphanumeric literal) to its corresponding numeric value. @@ -1465,7 +1465,7 @@ If it contains a @code{CR}, @code{DB}, or the minus sign (@samp{-}), the returne @comment ** 8.1.70 NUMVAL-C ** @comment ********************************************************************* @page -@newsubsection{8.1.70,NUMVAL-C} +@newsubsection{NUMVAL-C} @diagram{NUMVAL-C Function,FN-NUMVAL-C,FN-NUMVAL-C,None} This function converts a @var{string} (a group item, @code{USAGE DISPLAY} elementary item or alphanumeric literal) representing a currency value to its corresponding numeric value. @@ -1506,7 +1506,7 @@ When the @code{LOCALE} keyword is not specified, the returning value is negative @comment ** 8.1.70B NUMVAL-C ** @comment ********************************************************************* @page -@newsubsection{8.1.70B,NUMVAL-C-2} +@newsubsection{NUMVAL-C-2} @diagram{NUMVAL-C Function,FN-NUMVAL-C-2,FN-NUMVAL-C-2,None} This function returns the numeric value represented by the character string specified by @var{argument-1} and defined as alphanumeric. @@ -1542,7 +1542,7 @@ When the @code{LOCALE} keyword is specified, the returned value is negative if s @comment ** 8.1.71 NUMVAL-F ** @comment ********************************************************************* @page -@newsubsection{8.1.71,NUMVAL-F} +@newsubsection{NUMVAL-F} @diagram{NUMVAL-F Function,FN-NUMVAL-F,FN-NUMVAL-F,None} This function converts a @var{string} (a group item, @code{USAGE DISPLAY} elementary item or alphanumeric literal) representing a floating-point value to its corresponding numeric value. @@ -1561,7 +1561,7 @@ Leading and/or trailing spaces are allowed, as are spaces before and/or after an @comment ** 8.1.72 ORD ** @comment ********************************************************************* @page -@newsubsection{8.1.72,ORD} +@newsubsection{ORD} @diagram{ORD Function,FN-ORD,FN-ORD,None} This function returns the ordinal position in the program character set (usually @sc{ASCII}) corresponding to the 1@sup{st} character of @var{char} argument (a group item, @code{USAGE DISPLAY} elementary item or alphanumeric literal). @@ -1581,7 +1581,7 @@ The following code is an alternative approach when you just wish to convert an @ @comment ** 8.1.73 ORD-MAX ** @comment ********************************************************************* @page -@newsubsection{8.1.73,ORD-MAX} +@newsubsection{ORD-MAX} @diagram{ORD-MAX Function,FN-ORD-MAX,FN-ORD-MAX,None} This function returns the ordinal position in the argument list corresponding to the @var{char-n} whose 1@sup{st} character has the highest position in the program collating sequence (usually @sc{ASCII}). @@ -1590,7 +1590,7 @@ For example, assuming the program is using the standard @sc{ASCII} collating seq @comment ** 8.1.74 ORD-MIN ** @comment ********************************************************************* @page -@newsubsection{8.1.74,ORD-MIN} +@newsubsection{ORD-MIN} @diagram{ORD-MIN Function,FN-ORD-MIN,FN-ORD-MIN,None} This function returns the ordinal position in the argument list corresponding to the @var{char-n} whose 1@sup{st} character has the lowest position in the program collating sequence (usually @sc{ASCII}). @@ -1599,7 +1599,7 @@ For example, assuming the program is using the standard @sc{ASCII} collating seq @comment ** 8.1.75 PI ** @comment ********************************************************************* @page -@newsubsection{8.1.75,PI} +@newsubsection{PI} @diagram{PI Function,FN-PI,FN-PI,None} This function returns the mathematical constant @i{PI}. The maximum precision with which this value may be returned is 3.1415926535897932384626433832795029. @@ -1608,7 +1608,7 @@ Since this function has no arguments, no parenthesis should be specified. @comment ** 8.1.76 PRESENT-VALUE ** @comment ********************************************************************* @page -@newsubsection{8.1.76,PRESENT-VALUE} +@newsubsection{PRESENT-VALUE} @diagram{PRESENT-VALUE Function,FN-PRESENT-VALUE,FN-PRESENT-VALUE,None} The @code{PRESENT-VALUE} function returns a value that approximates the present value of a series of future period-end amounts specified by the various @var{value-n} arguments at a discount rate specified by the @var{rate} argument. @@ -1626,7 +1626,7 @@ $$ presentvalue = \sum_{i=1}^N @comment ** 8.1.77 RANDOM ** @comment ********************************************************************* @page -@newsubsection{8.1.77,RANDOM} +@newsubsection{RANDOM} @diagram{RANDOM Function,FN-RANDOM,FN-RANDOM,None} This function returns a pseudo-random non-integer value in the range 0 to 1 (for example, 0.123456789). @@ -1676,7 +1676,7 @@ The first 16 characters returned by the @syntaxref{CURRENT-DATE} function will b @comment ** 8.1.78 RANGE ** @comment ********************************************************************* @page -@newsubsection{8.1.78,RANGE} +@newsubsection{RANGE} @diagram{RANGE Function,FN-RANGE,FN-RANGE,None} The @code{RANGE} function returns a value that is equal to the value of the maximum @var{number-n} in the argument list minus the value of the minimum @var{number-n} argument. @@ -1685,21 +1685,21 @@ All @var{number-n} arguments are numeric data items and/or numeric literals. @comment ** 8.1.79 REM ** @comment ********************************************************************* @page -@newsubsection{8.1.79,REM} +@newsubsection{REM} @diagram{REM Function,FN-REM,FN-REM,None} This function returns a numeric value that is the remainder of @var{number} divided by @var{divisor}. Both arguments must be numeric data items or numeric literals. @comment ********************************************************************* @comment ** 8.1.80 REVERSE ** @comment ********************************************************************* @page -@newsubsection{8.1.80,REVERSE} +@newsubsection{REVERSE} @diagram{REVERSE Function,FN-REVERSE,FN-REVERSE,None} This function returns the byte-by-byte reversed value of @var{string} (a group item, @code{USAGE DISPLAY} elementary item or alphanumeric literal). @comment ********************************************************************* @comment ** 8.1.81 SECONDS-FROM-FORMATTED-TIME ** @comment ********************************************************************* @page -@newsubsection{8.1.81,SECONDS-FROM-FORMATTED-TIME} +@newsubsection{SECONDS-FROM-FORMATTED-TIME} @diagram{SECONDS-FROM-FORMATTED-TIME Function,FN-SECS-FROM-FMTD-TM,FN-SECS-FROM-FMTD-TM,None} This function decodes the string @var{time} --- whose value represents a formatted time --- and returns the total number of seconds that string represents. @@ -1710,7 +1710,7 @@ The @var{format} argument is a string (a group item, @code{USAGE DISPLAY} elemen @comment ** 8.1.82 SECONDS-PAST-MIDNIGHT ** @comment ********************************************************************* @page -@newsubsection{8.1.82,SECONDS-PAST-MIDNIGHT} +@newsubsection{SECONDS-PAST-MIDNIGHT} @diagram{SECONDS-PAST-MIDNIGHT Function,FN-SECS-PAST-MIDNIGHT,FN-SECS-PAST-MIDNIGHT,None} This function returns the current time of day expressed as the total number of elapsed seconds since midnight. @@ -1719,14 +1719,14 @@ Since this function has no arguments, no parenthesis should be specified. @comment ** 8.1.83 SIGN ** @comment ********************************************************************* @page -@newsubsection{8.1.83,SIGN} +@newsubsection{SIGN} @diagram{SIGN Function,FN-SIGN,FN-SIGN,None} The @code{SIGN} function returns a -1 if the value of @var{number} (a numeric literal or numeric data item) is negative, a zero if the value of @var{number} is exactly zero and a 1 if the value of @var{number} if greater than 0. @comment ********************************************************************* @comment ** 8.1.84 SIN ** @comment ********************************************************************* @page -@newsubsection{8.1.84,SIN} +@newsubsection{SIN} @diagram{SIN Function,FN-SIN,FN-SIN,None} This function determines and returns the trigonometric sine of @var{angle} (a numeric literal or numeric data item). @@ -1739,7 +1739,7 @@ COMPUTE @var{radians} = ( @var{degrees} * FUNCTION PI) / 180 @comment ** 8.1.85 SQRT ** @comment ********************************************************************* @page -@newsubsection{8.1.85,SQRT} +@newsubsection{SQRT} @diagram{SQRT Function,FN-SQRT,FN-SQRT,None} The @code{SQRT} function returns a numeric value that approximates the square root of @var{number} (a numeric data item or numeric literal with a non-negative value). @@ -1755,21 +1755,21 @@ The following two statements produce identical results: @comment ** 8.1.86 STANDARD-DEVIATION ** @comment ********************************************************************* @page -@newsubsection{8.1.86,STANDARD-DEVIATION} +@newsubsection{STANDARD-DEVIATION} @diagram{STANDARD-DEVIATION Function,FN-STANDARD-DEVIATION,FN-STANDARD-DEVIATION,None} This function returns the statistical standard deviation of the list of @var{number-n} arguments (numeric data items or numeric literals). @comment ********************************************************************* @comment ** 8.1.87 STORED-CHAR-LENGTH ** @comment ********************************************************************* @page -@newsubsection{8.1.87,STORED-CHAR-LENGTH} +@newsubsection{STORED-CHAR-LENGTH} @diagram{STORED-CHAR-LENGTH Function,FN-STORED-CHAR-LENGTH,FN-STORED-CHAR-LENGTH,None} Returns the length --- in bytes --- of the specified @code{string} (a group item, @code{USAGE DISPLAY} elementary item or alphanumeric literal), minus the total number of trailing spaces, if any. @comment ********************************************************************* @comment ** 8.1.88 SUBSTITUTE ** @comment ********************************************************************* @page -@newsubsection{8.1.88,SUBSTITUTE} +@newsubsection{SUBSTITUTE} @diagram{SUBSTITUTE Function,FN-SUBSTITUTE,FN-SUBSTITUTE,None} This function parses @var{string}, replacing all occurrences of @var{from-n} strings with the corresponding @var{to-n} strings. @@ -1793,7 +1793,7 @@ move function SUBSTITUTE-CASE (WS-Dest-File-Path, @comment ** 8.1.89 SUBSTITUTE-CASE ** @comment ********************************************************************* @page -@newsubsection{8.1.89,SUBSTITUTE-CASE} +@newsubsection{SUBSTITUTE-CASE} @diagram{SUBSTITUTE-CASE Function,FN-SUBSTITUTE-CASE,FN-SUBSTITUTE-CASE,None} The @code{SUBSTITUTE-CASE} function operates the same as the @syntaxref{SUBSTITUTE} function, except that @var{from-n} string matching is performed without regard to case. @@ -1812,14 +1812,14 @@ move function SUBSTITUTE-CASE (WS-Dest-File-Path, @comment ** 8.1.90 SUM ** @comment ********************************************************************* @page -@newsubsection{8.1.90,SUM} +@newsubsection{SUM} @diagram{SUM Function,FN-SUM,FN-SUM,None} The @code{SUM} function returns a value that is the sum of @var{number-n} arguments (these may be numeric data items or numeric literals). @comment ********************************************************************* @comment ** 8.1.91 TAN ** @comment ********************************************************************* @page -@newsubsection{8.1.91,TAN} +@newsubsection{TAN} @diagram{TAN Function,FN-TAN,FN-TAN,None} This function determines and returns the trigonometric tangent of @var{angle} (a numeric literal or numeric data item). @@ -1832,7 +1832,7 @@ COMPUTE @var{radians} = ( @var{degrees} * FUNCTION PI) / 180 @comment ** 8.1.92 TEST-DATE-YYYYMMDD ** @comment ********************************************************************* @page -@newsubsection{8.1.92,TEST-DATE-YYYYMMDD} +@newsubsection{TEST-DATE-YYYYMMDD} @diagram{TEST-DATE-YYYYMMDD Function,FN-TEST-DATE-YYYYMMDD,FN-TEST-DATE-YYYYMMDD,None} This function determines if the supplied @var{date} argument (a numeric integer data item or literal) is a valid date. @@ -1843,7 +1843,7 @@ If the @var{date} is valid, a 0 value is returned. If it isn't, a value of 1, 2 @comment ** 8.1.93 TEST-DAY-YYYYDDD ** @comment ********************************************************************* @page -@newsubsection{8.1.93,TEST-DAY-YYYYDDD} +@newsubsection{TEST-DAY-YYYYDDD} @diagram{TEST-DAY-YYYYDDD Function,FN-TEST-DAY-YYYYDDD,FN-TEST-DAY-YYYYDDD,None} This function determines if the supplied @var{date} (a numeric integer data item or literal) is a valid date. @@ -1854,7 +1854,7 @@ If the date is valid, a 0 value is returned. If it isn't, a value of 1 or 2 is @comment ** 8.1.94 TEST-FORMATTED-DATETIME ** @comment ********************************************************************* @page -@newsubsection{8.1.94,TEST-FORMATTED-DATETIME} +@newsubsection{TEST-FORMATTED-DATETIME} @diagram{TEST-FORMATTED-DATETIME Function,FN-TEST-FORMATTED-DATETIME,FN-TEST-FORMATTED-DATETIME,None} @code{TEST-FORMATTED-DATETIME} tests whether a date literal representing a date, a time or a combined date and time is valid according to the specified format. @@ -1877,7 +1877,7 @@ FUNCTION TEST-FORMATTED-DATETIME("YYYYMMDD", "20124523") @comment ** 8.1.95 TEST-NUMVAL ** @comment ********************************************************************* @page -@newsubsection{8.1.95,TEST-NUMVAL} +@newsubsection{TEST-NUMVAL} @diagram{TEST-NUMVAL Function,FN-TEST-NUMVAL,FN-TEST-NUMVAL,None} The @code{TEST-NUMVAL} function evaluates @var{string} (a group item, @code{USAGE DISPLAY} elementary item or alphanumeric literal) for being appropriate for use as the @var{string} argument to a @syntaxref{NUMVAL} function, returning to a integer a zero value if it is appropriate otherwise if one or more characters are in error, the position of the first character in error or the length of the field plus one for other cases such as all spaces. @@ -1886,7 +1886,7 @@ Note that these errors include but are not limited to: argument (@var{string}) i @comment ** 8.1.96 TEST-NUMVAL-C ** @comment ********************************************************************* @page -@newsubsection{8.1.96,TEST-NUMVAL-C} +@newsubsection{TEST-NUMVAL-C} @diagram{TEST-NUMVAL-C Function,FN-TEST-NUMVAL-C,FN-TEST-NUMVAL-C,None} This function evaluates @var{string} (a group item, @code{USAGE DISPLAY} elementary item or alphanumeric literal) for being appropriate for use as the @var{string} argument to a @syntaxref{NUMVAL-C} function, returning to a integer a zero value if it is appropriate otherwise if one or more characters are in error, the position of the first character in error or the length of the field plus one for other cases such as all spaces. @@ -1897,7 +1897,7 @@ The optional @var{symbol} argument serves the same function --- and has the same @comment ** 8.1.97 TEST-NUMVAL-F ** @comment ********************************************************************* @page -@newsubsection{8.1.97,TEST-NUMVAL-F} +@newsubsection{TEST-NUMVAL-F} @diagram{TEST-NUMVAL-F Function,FN-TEST-NUMVAL-F,FN-TEST-NUMVAL-F,None} This function evaluates @var{string} (a group item, @code{USAGE DISPLAY} elementary item or alphanumeric literal) for being appropriate for use as the @var{string} argument to a @syntaxref{NUMVAL-F} function, returning to a integer a zero value if it is appropriate otherwise if one or more characters are in error, the position of the first character in error or the length of the field plus one for other cases such as all spaces. @@ -1906,7 +1906,7 @@ Note that these errors include but are not limited to: argument (string) is zero @comment ** 8.1.98 TRIM ** @comment ********************************************************************* @page -@newsubsection{8.1.98,TRIM} +@newsubsection{TRIM} @diagram{TRIM Function,FN-TRIM,FN-TRIM,None} This function removes @syntaxidx{LEADING} or @@ -1917,7 +1917,7 @@ The second argument is specified as a keyword, not a quoted string or identifier @comment ** 8.1.99 UPPER-CASE ** @comment ********************************************************************* @page -@newsubsection{8.1.99,UPPER-CASE} +@newsubsection{UPPER-CASE} @diagram{UPPER-CASE Function,FN-UPPER-CASE,FN-UPPER-CASE,None} This function returns the value of @var{string} (a group item, @code{USAGE DISPLAY} elementary item or alphanumeric literal), converted entirely to upper case. @@ -1926,14 +1926,14 @@ What constitutes a ``letter'' (or upper/lower case too, for that manner) may be @comment ** 8.1.100 VARIANCE ** @comment ********************************************************************* @page -@newsubsection{8.1.100,VARIANCE} +@newsubsection{VARIANCE} @diagram{VARIANCE Function,FN-VARIANCE,FN-VARIANCE,None} This function returns the statistical variance of the specified list of @var{number-n} arguments (these may be numeric data items or numeric literals). @comment ********************************************************************* @comment ** 8.1.101 WHEN-COMPILED ** @comment ********************************************************************* @page -@newsubsection{8.1.101,WHEN-COMPILED} +@newsubsection{WHEN-COMPILED} @diagram{WHEN-COMPILED Function,FN-WHEN-COMPILED,FN-WHEN-COMPILED,None} The @code{WHEN-COMPILED} intrinsic function, not to be confused with the @syntaxrefalt{WHEN-COMPILED,Special Registers} special register, returns the date and time the program was compiled, in @sc{ASCII}. @@ -1946,7 +1946,7 @@ If the @switch{-fintrinsics=WHEN-COMPILED} or @switch{-fintrinsics=ALL} is speci @comment ** 8.1.102 YEAR-TO-YYYY ** @comment ********************************************************************* @page -@newsubsection{8.1.102,YEAR-TO-YYYY} +@newsubsection{YEAR-TO-YYYY} @diagram{YEAR-TO-YYYY Function,FN-YEAR-TO-YYYY,FN-YEAR-TO-YYYY,None} @code{YEAR-TO-YYYY} converts @var{yy} --- a two-digit year --- to a four-digit format (@code{yyyy}). @@ -1959,7 +1959,7 @@ All arguments must be numeric data items or numeric literals. @comment ** 8.1.103 BOOLEAN-OF-INTEGER ** @comment ********************************************************************* @page -@newsubsection{8.1.103,BOOLEAN-OF-INTEGER} +@newsubsection{BOOLEAN-OF-INTEGER} @diagram{BOOLEAN-OF-INTEGER Function,FN-BOOLEAN-OF-INTEGER,FN-BOOLEAN-OF-INTEGER,NOT-YET-IMPLEMENTED} @code{BOOLEAN-OF-INTEGER} returns a boolean item of usage bit representing the binary value of @var{argument-1}. @var{argument-2} specifies the length of the boolean data item that is returned. @@ -1972,7 +1972,7 @@ Returned value is a boolean item of usage bit that has the same bit configuratio @comment ** 8.1.104 CHAR-NATIONAL ** @comment ********************************************************************* @page -@newsubsection{8.1.104,CHAR-NATIONAL} +@newsubsection{CHAR-NATIONAL} @diagram{CHAR-NATIONAL Function,FN-CHAR-NATIONAL,FN-CHAR-NATIONAL,NOT-YET-IMPLEMENTED} @code{CHAR-NATIONAL} returns a one character value that is a character in the national program collating sequence having the ordinal position equal to the value of the argument. @@ -1981,7 +1981,7 @@ Returned value is a boolean item of usage bit that has the same bit configuratio @comment ** 8.1.105 DISPLAY-OF ** @comment ********************************************************************* @page -@newsubsection{8.1.105,DISPLAY-OF} +@newsubsection{DISPLAY-OF} @diagram{DISPLAY-OF Function,FN-DISPLAY-OF,FN-DISPLAY-OF,NOT-YET-IMPLEMENTED} @code{DISPLAY-OF} returns a character string containing the alphabetic coded character set representation of the national characters in the argument. @@ -2000,7 +2000,7 @@ The length of the returned value is the number of character positions of usage d @comment ** 8.1.106 EXCEPTION-FILE-N ** @comment ********************************************************************* @page -@newsubsection{8.1.106,EXCEPTION-FILE-N} +@newsubsection{EXCEPTION-FILE-N} @diagram{EXCEPTION-FILE-N Function,FN-EXCEPTION-FILE-N,FN-EXCEPTION-FILE-N,NOT-YET-IMPLEMENTED} @code{EXCEPTION-FILE-N} returns a national character string that is the I/O status value and file-name of the file connector, if any, associated with the last exception status. @@ -2026,7 +2026,7 @@ The documentation of the @subpgmref{CBL_ERROR_PROC} built-in subroutine illustra @comment ** 8.1.107 EXCEPTION-LOCATION-N ** @comment ********************************************************************* @page -@newsubsection{8.1.107,EXCEPTION-LOCATION-N} +@newsubsection{EXCEPTION-LOCATION-N} @diagram{EXCEPTION-LOCATION-N Function,FN-EXCEPTION-LOCATION-N,FN-EXCEPTION-LOCATION-N,NOT-YET-IMPLEMENTED} @code{EXCEPTION-LOCATION-N} returns an national character string containing exception information from the most-recently failing statement. The information is returned to a 1023 character string in one of the following formats, depending on the nature of the failure: @itemize @bullet @@ -2056,7 +2056,7 @@ The documentation of the @subpgmref{CBL_ERROR_PROC} built-in subroutine illustra @comment ** 8.1.108 INTEGER-OF-BOOLEAN ** @comment ********************************************************************* @page -@newsubsection{8.1.108,INTEGER-OF-BOOLEAN} +@newsubsection{INTEGER-OF-BOOLEAN} @diagram{INTEGER-OF-BOOLEAN Function,FN-INTEGER-OF-BOOLEAN,FN-INTEGER-OF-BOOLEAN,NOT-YET-IMPLEMENTED} @code{INTEGER-OF-BOOLEAN} returns the numeric value of the boolean string in @var{argument-1} which is class boolean. @@ -2072,7 +2072,7 @@ COBOL representation. @comment ** 8.1.109 NATIONAL-OF ** @comment ********************************************************************* @page -@newsubsection{8.1.109,NATIONAL-OF} +@newsubsection{NATIONAL-OF} @diagram{NATIONAL-OF Function,FN-NATIONAL-OF,FN-NATIONAL-OF,NOT-YET-IMPLEMENTED} @code{NATIONAL-OF} returns a character string containing the national character representation of the characters in the argument which must be of class boolean. @@ -2087,7 +2087,7 @@ The length of the returned value is the number of character positions of usage n @comment ** 8.1.110 STANDARD-COMPARE ** @comment ********************************************************************* @page -@newsubsection{8.1.110,STANDARD-COMPARE} +@newsubsection{STANDARD-COMPARE} @diagram{STANDARD-COMPARE Function,FN-STANDARD-COMPARE,FN-STANDARD-COMPARE,NOT-YET-IMPLEMENTED} @code{STANDARD-COMPARE} returns a character indicating the result of comparing @var{argument-1} as a alphanumeric and @var{argument-2} using a cultural ordering table. @@ -2158,7 +2158,7 @@ The length of the returned value is 1. @comment ** 8.2 Built-In System Subroutines ** @comment ********************************************************************* @page -@newsection{8.2,Built-In System Subroutines} +@newsection{Built-In System Subroutines} There are a number of built-in system subroutines included with GnuCOBOL. Generally, these routines are intended to match those available in Micro Focus COBOL, ACUCOBOL and directly for GnuCOBOL. @@ -2238,69 +2238,69 @@ The following sections describe the various built-in subroutines. @i{All subrou @registerref{RETURN-CODE} could utilize the @code{RETURNING} clause on the @statement{CALL} to return the result back to the full-word binary data item of your choice. @menu -* 8.2.1: C$CALLEDBY. -* 8.2.2: C$CHDIR. -* 8.2.3: C$COPY. -* 8.2.4: C$DELETE. -* 8.2.5: C$FILEINFO. -* 8.2.6: C$GETPID. -* 8.2.7: C$JUSTIFY. -* 8.2.8: C$MAKEDIR. -* 8.2.9: C$NARG. -* 8.2.10: C$PARAMSIZE. -* 8.2.11: C$PRINTABLE. -* 8.2.12: C$SLEEP. -* 8.2.13: C$TOLOWER. -* 8.2.14: C$TOUPPER. -* 8.2.15: CBL_AND. -* 8.2.16: CBL_CHANGE_DIR. -* 8.2.17: CBL_CHECK_FILE_EXIST. -* 8.2.18: CBL_CLOSE_FILE. -* 8.2.19: CBL_COPY_FILE. -* 8.2.20: CBL_CREATE_DIR. -* 8.2.21: CBL_CREATE_FILE. -* 8.2.22: CBL_DELETE_DIR. -* 8.2.23: CBL_DELETE_FILE. -* 8.2.24: CBL_EQ. -* 8.2.25: CBL_ERROR_PROC. -* 8.2.26: CBL_EXIT_PROC. -* 8.2.27: CBL_FLUSH_FILE. -* 8.2.28: CBL_GC_FORK. -* 8.2.29: CBL_GC_GETOPT. -* 8.2.30: CBL_GC_HOSTED. -* 8.2.31: CBL_GC_NANOSLEEP. -* 8.2.32: CBL_GC_PRINTABLE. -* 8.2.33: CBL_GC_WAITPID. -* 8.2.34: CBL_GET_CSR_POS. -* 8.2.35: CBL_GET_CURRENT_DIR. -* 8.2.36: CBL_GET_SCR_SIZE. -* 8.2.37: CBL_IMP. -* 8.2.38: CBL_NIMP. -* 8.2.39: CBL_NOR. -* 8.2.40: CBL_NOT. -* 8.2.42: CBL_OPEN_FILE. -* 8.2.43: CBL_OR. -* 8.2.44: CBL_READ_FILE. -* 8.2.45: CBL_READ_KBD_CHAR. -* 8.2.46: CBL_RENAME_FILE. -* 8.2.47: CBL_SET_CSR_POS. -* 8.2.48: CBL_SET_SCR_SIZE. -* 8.2.49: CBL_TOLOWER. -* 8.2.50: CBL_TOUPPER. -* 8.2.51: CBL_WRITE_FILE. -* 8.2.52: CBL_XOR. -* 8.2.53: SYSTEM. -* 8.2.54: X"91". -* 8.2.55: X"E4". -* 8.2.56: X"E5". -* 8.2.57: X"F4". -* 8.2.58: X"F5". +* C$CALLEDBY. +* C$CHDIR. +* C$COPY. +* C$DELETE. +* C$FILEINFO. +* C$GETPID. +* C$JUSTIFY. +* C$MAKEDIR. +* C$NARG. +* C$PARAMSIZE. +* C$PRINTABLE. +* C$SLEEP. +* C$TOLOWER. +* C$TOUPPER. +* CBL_AND. +* CBL_CHANGE_DIR. +* CBL_CHECK_FILE_EXIST. +* CBL_CLOSE_FILE. +* CBL_COPY_FILE. +* CBL_CREATE_DIR. +* CBL_CREATE_FILE. +* CBL_DELETE_DIR. +* CBL_DELETE_FILE. +* CBL_EQ. +* CBL_ERROR_PROC. +* CBL_EXIT_PROC. +* CBL_FLUSH_FILE. +* CBL_GC_FORK. +* CBL_GC_GETOPT. +* CBL_GC_HOSTED. +* CBL_GC_NANOSLEEP. +* CBL_GC_PRINTABLE. +* CBL_GC_WAITPID. +* CBL_GET_CSR_POS. +* CBL_GET_CURRENT_DIR. +* CBL_GET_SCR_SIZE. +* CBL_IMP. +* CBL_NIMP. +* CBL_NOR. +* CBL_NOT. +* CBL_OPEN_FILE. +* CBL_OR. +* CBL_READ_FILE. +* CBL_READ_KBD_CHAR. +* CBL_RENAME_FILE. +* CBL_SET_CSR_POS. +* CBL_SET_SCR_SIZE. +* CBL_TOLOWER. +* CBL_TOUPPER. +* CBL_WRITE_FILE. +* CBL_XOR. +* SYSTEM. +* X"91". +* X"E4". +* X"E5". +* X"F4". +* X"F5". @end menu @page @comment ********************************************************************* @comment ** 8.2.1 C$CALLEDBY ** @comment ********************************************************************* -@newsubsection{8.2.1,C$CALLEDBY} +@newsubsection{C$CALLEDBY} @diagram{C$CALLEDBY Built-In Subroutine,SS-C$CALLEDBY,SS-C$CALLEDBY,None} This routine returns the name of the program that called the currently-executing program. The program name will be returned, left-justified and space filled, in @var{prog-name-area} argument, which should be a @code{PIC X} elementary item or a group item. If @var{prog-name-area} is too small to receive the entire program name, the program name value will be truncated (on the right) to fit. @@ -2318,7 +2318,7 @@ The @comment ** 8.2.2 C$CHDIR ** @comment ********************************************************************* @page -@newsubsection{8.2.2,C$CHDIR} +@newsubsection{C$CHDIR} @diagram{C$CHDIR Built-In Subroutine,SS-C$CHDIR,SS-C$CHDIR,None} This routine makes @var{directory-path} (an alphanumeric literal or identifier) the current directory. @@ -2330,7 +2330,7 @@ The directory change remains in effect until the program terminates (in which th @comment ** 8.2.3 C$COPY ** @comment ********************************************************************* @page -@newsubsection{8.2.3,C$COPY} +@newsubsection{C$COPY} @diagram{C$COPY Built-In Subroutine,SS-C$COPY,SS-C$COPY,None} Use this subroutine to copy file @var{src-file-path} to @var{dest-file-path} as if it were done via the @command{cp} (Unix/OSX) or @code{COPY} (Windows) command. @@ -2344,7 +2344,7 @@ If the attempt to copy the file fails (for example, it or the destination direct @comment ** 8.2.4 C$DELETE ** @comment ********************************************************************* @page -@newsubsection{8.2.4,C$DELETE} +@newsubsection{C$DELETE} @diagram{C$DELETE Built-In Subroutine,SS-C$DELETE,SS-C$DELETE,None} This routine deletes the file specified by the @var{file-path} argument (an alphanumeric literal or identifier) just as if that were done using the @command{rm} (Unix/OSX) or @command{ERASE} (Windows) command. @@ -2356,7 +2356,7 @@ If the attempt to delete the file fails (for example, it doesn't exist), the @comment ** 8.2.5 C$FILEINFO ** @comment ********************************************************************* @page -@newsubsection{8.2.5,C$FILEINFO} +@newsubsection{C$FILEINFO} @diagram{C$FILEINFO Built-In Subroutine,SS-C$FILEINFO,SS-C$FILEINFO,None} With this routine you may retrieve the size of the file specified as the @var{file-path} argument (an alphanumeric literal or identifier) and the date/time that file was last modified. File size information may not be available in the particular GnuCOBOL build / Operating System combination you are using and may therefore always be returned as zero. The information is returned to the @var{file-info} argument, which is defined as the following 16-byte area: @@ -2377,7 +2377,7 @@ If the subroutine is successful, a value of 0 will be returned in the @comment ** 8.2.6 C$GETPID} ** @comment ********************************************************************* @page -@newsubsection{8.2.6,C$GETPID} +@newsubsection{C$GETPID} @diagram{C$GETPID Built-In Subroutine,SS-C$GETPID,SS-C$GETPID,None} Use this subroutine to return the PID (process ID) of the executing GnuCOBOL program. The PID value is returned into the @registerref{RETURN-CODE}. @@ -2387,7 +2387,7 @@ There are no arguments to this routine. @comment ** 8.2.7 C$JUSTIFY ** @comment ********************************************************************* @page -@newsubsection{8.2.7,C$JUSTIFY} +@newsubsection{C$JUSTIFY} @diagram{C$JUSTIFY Built-In Subroutine,SS-C$JUSTIFY,SS-C$JUSTIFY,None} Use @code{C$JUSTIFY} to left, right or center-justify an alphabetic, alphanumeric or numeric edited data-item. The optional @var{justification-type} argument indicates the type of the justification to be performed. Its value is interpreted as follows: @table @samp @@ -2407,7 +2407,7 @@ If it begins with anything else, or is absent, it will be treated as if it is pr @comment ** 8.2.8 C$MAKEDIR ** @comment ********************************************************************* @page -@newsubsection{8.2.8,C$MAKEDIR} +@newsubsection{C$MAKEDIR} @diagram{C$MAKEDIR Built-In Subroutine,SS-C$MAKEDIR,SS-C$MAKEDIR,None} With this routine you may create a new directory --- the name of which is supplied as the @var{dir-path} argument (an alphanumeric literal or identifier). @@ -2418,7 +2418,7 @@ The @registerref{RETURN-CODE} will be set to the return code of the operation; t @comment ** 8.2.9 C$NARG ** @comment ********************************************************************* @page -@newsubsection{8.2.9,C$NARG} +@newsubsection{C$NARG} @diagram{C$NARG Built-In Subroutine,SS-C$NARG,SS-C$NARG,None} This subroutine returns the number of arguments passed to the program that calls it back to in the numeric field @var{arg-count-result}. When called from within a user-defined function, a value of one (1) is returned if any arguments were passed to the function or a zero (0) otherwise. @@ -2427,7 +2427,7 @@ When called from a main program, the returned value will always be 0. @comment ** 8.2.10 C$PARAMSIZE ** @comment ********************************************************************* @page -@newsubsection{8.2.10,C$PARAMSIZE} +@newsubsection{C$PARAMSIZE} @diagram{C$PARAMSIZE Built-In Subroutine,SS-C$PARAMSIZE,SS-C$PARAMSIZE,None} This subroutine returns the size (in bytes) of the subroutine argument supplied using the @var{argument-number} parameter (a numeric literal or data item). @@ -2439,7 +2439,7 @@ If the specified argument does not exist, or an invalid argument number is speci @comment ** 8.2.11 C$PRINTABLE ** @comment ********************************************************************* @page -@newsubsection{8.2.11,C$PRINTABLE} +@newsubsection{C$PRINTABLE} @diagram{C$PRINTABLE Built-In Subroutine,SS-C$PRINTABLE,SS-C$PRINTABLE,None} The @code{C$PRINTABLE} subroutine converts the contents of the data-item specified as the first argument to printable characters. Those characters that are deemed printable (as defined by the character set used by @var{data-item}) will remain unchanged, while those that are NOT printable will be converted to the character specified as the second argument. @@ -2450,7 +2450,7 @@ If no @var{char} argument is provided, a period (@samp{.}) will be used. @comment ** 8.2.12 C$SLEEP ** @comment ********************************************************************* @page -@newsubsection{8.2.12,C$SLEEP} +@newsubsection{C$SLEEP} @diagram{C$SLEEP Built-In Subroutine,SS-C$SLEEP,SS-C$SLEEP,None} @code{C$SLEEP} puts the program to sleep for the specified number of seconds and/or fractions of a second. The @var{seconds-to-sleep} argument may be a numeric literal or data item. @@ -2469,7 +2469,7 @@ The maximum time can be adjusted by the define MAX_SLEEP_TIME during compilation @comment ** 8.2.13 C$TOLOWER ** @comment ********************************************************************* @page -@newsubsection{8.2.13,C$TOLOWER} +@newsubsection{C$TOLOWER} @diagram{C$TOLOWER Built-In Subroutine,SS-C$TOLOWER,SS-C$TOLOWER,None} This routine will converts the @var{convert-length} (a numeric literal or data item) leading characters of @var{data-item} (an alphanumeric identifier) to lower-case. @@ -2481,7 +2481,7 @@ If @var{convert-length} is negative or zero, no conversion will be performed. @comment ** 8.2.14 C$TOUPPER ** @comment ********************************************************************* @page -@newsubsection{8.2.14,C$TOUPPER} +@newsubsection{C$TOUPPER} @diagram{C$TOUPPER Built-In Subroutine,SS-C$TOUPPER,SS-C$TOUPPER,None} This routine will converts the @var{convert-length} (a numeric literal or data item) leading characters of @var{data-item} (an alphanumeric identifier) to upper-case. @@ -2493,7 +2493,7 @@ If @var{convert-length} is negative or zero, no conversion will be performed. @comment ** 8.2.15 CBL_AND ** @comment ********************************************************************* @page -@newsubsection{8.2.15,CBL_AND} +@newsubsection{CBL_AND} @diagram{CBL_AND Built-In Subroutine,SS-CBL_AND,SS-CBL_AND,None} @multitable @columnfractions 0.3 0.7 @item @@ -2521,7 +2521,7 @@ A result of zero will be passed back in the @comment ** 8.2.16 CBL_CHANGE_DIR ** @comment ********************************************************************* @page -@newsubsection{8.2.16,CBL_CHANGE_DIR} +@newsubsection{CBL_CHANGE_DIR} @diagram{CBL_CHANGE_DIR Built-In Subroutine,SS-CBL_CHANGE_DIR,SS-CBL_CHANGE_DIR,None} This routine makes @var{directory-path} (an alphanumeric literal or identifier) the current directory. @@ -2533,7 +2533,7 @@ The directory change remains in effect until the program terminates (in which th @comment ** 8.2.17 CBL_CHECK_FILE_EXIST ** @comment ********************************************************************* @page -@newsubsection{8.2.17,CBL_CHECK_FILE_EXIST} +@newsubsection{CBL_CHECK_FILE_EXIST} @diagram{CBL_CHECK_FILE_EXIST Built-In Subroutine,SS-CBL_CHK_FILE_EX,SS-CBL_CHK_FILE_EX,None} With this routine you may retrieve the size of the file specified as the @var{file-path} argument (an alphanumeric literal or identifier) and the date/time that file was last modified. File size information may not be available in the particular GnuCOBOL build / Operating System combination you are using and may therefore always be returned as zero. @@ -2559,7 +2559,7 @@ If the subroutine is successful, a value of 0 will be returned in the @comment ** 8.2.18 CBL_CLOSE_FILE ** @comment ********************************************************************* @page -@newsubsection{8.2.18,CBL_CLOSE_FILE} +@newsubsection{CBL_CLOSE_FILE} @diagram{CBL_CLOSE_FILE Built-In Subroutine,SS-CBL_CLOSE_FILE,SS-CBL_CLOSE_FILE,None} The @code{CBL_CLOSE_FILE} subroutine closes a byte stream file previously opened by either the @subpgmref{CBL_OPEN_FILE} or @subpgmref{CBL_CREATE_FILE} subroutines. @@ -2572,7 +2572,7 @@ If the subroutine is successful, a value of 0 will be returned in the @comment ** 8.2.19 CBL_COPY_FILE ** @comment ********************************************************************* @page -@newsubsection{8.2.19,CBL_COPY_FILE} +@newsubsection{CBL_COPY_FILE} @diagram{CBL_COPY_FILE Built-In Subroutine,SS-CBL_COPY_FILE,SS-CBL_COPY_FILE,None} Use this subroutine to copy file @var{src-file-path} to @var{dest-file-path} as if it were done via the @command{cp} (Unix/OSX) or @code{COPY} (Windows) command. @@ -2584,7 +2584,7 @@ If the attempt to copy the file fails (for example, it or the destination direct @comment ** 8.2.20 CBL_CREATE_DIR ** @comment ********************************************************************* @page -@newsubsection{8.2.20,CBL_CREATE_DIR} +@newsubsection{CBL_CREATE_DIR} @diagram{CBL_CREATE_DIR Built-In Subroutine,SS-CBL_CREATE_DIR,SS-CBL_CREATE_DIR,None} With this routine you may create a new directory --- the name of which is supplied as the @var{dir-path} argument (an alphanumeric literal or identifier). @@ -2596,7 +2596,7 @@ The @comment ** 8.2.21 CBL_CREATE_FILE ** @comment ********************************************************************* @page -@newsubsection{8.2.21,CBL_CREATE_FILE} +@newsubsection{CBL_CREATE_FILE} @diagram{CBL_CREATE_FILE Built-In Subroutine,SS-CBL_CREATE_FILE,SS-CBL_CREATE_FILE,None} The @code{CBL_CREATE_FILE} subroutine creates the new file specified using the file-path argument and opens it for output as a byte-stream file usable by @subpgmref{CBL_WRITE_FILE}. @@ -2610,7 +2610,7 @@ The success or failure of the subroutine will be reported back in the @comment ** 8.2.22 CBL_DELETE_DIR ** @comment ********************************************************************* @page -@newsubsection{8.2.22,CBL_DELETE_DIR} +@newsubsection{CBL_DELETE_DIR} @diagram{CBL_DELETE_DIR Built-In Subroutine,SS-CBL_DELETE_DIR,SS-CBL_DELETE_DIR,None} This subroutine deletes an empty directory. @@ -2623,7 +2623,7 @@ The @registerref{RETURN-CODE} will be set to the return code of the operation; t @comment ** 8.2.23 CBL_DELETE_FILE ** @comment ********************************************************************* @page -@newsubsection{8.2.23,CBL_DELETE_FILE} +@newsubsection{CBL_DELETE_FILE} @diagram{CBL_DELETE_FILE Built-In Subroutine,SS-CBL_DELETE_FILE,SS-CBL_DELETE_FILE,None} This routine deletes the file specified by the @var{file-path} argument (an alphanumeric literal or identifier) just as if that were done using the @command{rm} (Unix/OSX) or @code{ERASE} (Windows) command. @@ -2633,7 +2633,7 @@ If the attempt to delete the file fails (for example, it doesn't exist), the @comment ** 8.2.24 CBL_EQ ** @comment ********************************************************************* @page -@newsubsection{8.2.24,CBL_EQ} +@newsubsection{CBL_EQ} @diagram{CBL_EQ Built-In Subroutine,SS-CBL_EQ,SS-CBL_EQ,None} @multitable @columnfractions 0.3 0.7 @item @@ -2662,7 +2662,7 @@ A result of zero will be passed back in the @comment ** 8.2.25 CBL_ERROR_PROC ** @comment ********************************************************************* @page -@newsubsection{8.2.25,CBL_ERROR_PROC} +@newsubsection{CBL_ERROR_PROC} @diagram{CBL_ERROR_PROC Built-In Subroutine,SS-CBL_ERROR_PROC,SS-CBL_ERROR_PROC,None} This routine registers a general error-handling routine. @@ -2734,7 +2734,7 @@ E:\Programs\Demos> @comment ** 8.2.26 CBL_EXIT_PROC ** @comment ********************************************************************* @page -@newsubsection{8.2.26,CBL_EXIT_PROC} +@newsubsection{CBL_EXIT_PROC} @diagram{CBL_EXIT_PROC Built-In Subroutine,SS-CBL_EXIT_PROC,SS-CBL_EXIT_PROC,None} This routine registers a general exit-handling routine. @@ -2797,7 +2797,7 @@ END PROGRAM ExitProc. @comment ** 8.2.27 CBL_FLUSH_FILE ** @comment ********************************************************************* @page -@newsubsection{8.2.27,CBL_FLUSH_FILE} +@newsubsection{CBL_FLUSH_FILE} @diagram{CBL_FLUSH_FILE Built-In Subroutine,SS-CBL_FLUSH_FILE,SS-CBL_FLUSH_FILE,None} In Micro Focus COBOL, calling this subroutine flushes any as-yet unwritten buffers for the (output) file whose file-handle is specified as the argument to disk. @@ -2806,7 +2806,7 @@ This routine is non-functional in GnuCOBOL. It exists only to provide compatibi @comment ** 8.2.28 CBL_GC_FORK ** @comment ********************************************************************* @page -@newsubsection{8.2.28,CBL_GC_FORK} +@newsubsection{CBL_GC_FORK} @diagram{CBL_GC_FORK Built-In Subroute,SS-CBL_GC_FORK,SS-CBL_GC_FORK,None} CBL_GC_FORK allows you to fork the current COBOL process to a new one. @@ -2879,7 +2879,7 @@ current system. @comment ** 8.2.29 CBL_GC_GETOPT ** @comment ********************************************************************* @page -@newsubsection{8.2.29,CBL_GC_GETOPT} +@newsubsection{CBL_GC_GETOPT} @diagram{CBL_GC_GETOPT Built-In Subroutine,SS-CBL_GC_GETOPT,SS-CBL_GC_GETOPT,None} @code{CBL_GC_GETOPT} adapts the well-known option parser, @code{getopt}, to GnuCOBOL. @@ -2998,7 +2998,7 @@ a regular answer from @code{getopt} @comment ** 8.2.30 CBL_GC_HOSTED ** @comment ********************************************************************* @page -@newsubsection{8.2.30,CBL_GC_HOSTED} +@newsubsection{CBL_GC_HOSTED} @diagram{CBL_GC_HOSTED Built-In Subroutine,SS-CBL_GC_HOSTED,SS-CBL_GC_HOSTED,None} @code{CBL_GC_HOSTED} provides access to the following C hosted variables: @@ -3117,7 +3117,7 @@ Note that the legacy name of this routine that starts with @code{CBL_OC} is depr @comment ** 8.2.31 CBL_GC_NANOSLEEP ** @comment ********************************************************************* @page -@newsubsection{8.2.31,CBL_GC_NANOSLEEP} +@newsubsection{CBL_GC_NANOSLEEP} @diagram{CBL_GC_NANOSLEEP Built-In Subroutine,SS-CBL_GC_NANOSLEEP,SS-CBL_GC_NANOSLEEP,None} This subroutine puts the program to sleep for the specified number of nanoseconds. @@ -3134,7 +3134,7 @@ Note that the legacy name of this routine starts with ``CBL_OC'' is deprecated, @comment ** 8.2.32 CBL_GC_PRINTABLE ** @comment ********************************************************************* @page -@newsubsection{8.2.32,CBL_GC_PRINTABLE} +@newsubsection{CBL_GC_PRINTABLE} @diagram{CBL_GC_PRINTABLE Built-In Subroutine,SS-CBL_GC_PRINTABLE,SS-CBL_GC_PRINTABLE,None} The @code{CBL_GC_PRINTABLE} subroutine converts the contents of the data-item specified as the first argument to printable characters. @@ -3145,7 +3145,7 @@ If no @var{char} argument is provided, a period (@samp{.}) will be used. @comment ** 8.2.33 CBL_GC_WAITPID ** @comment ********************************************************************* @page -@newsubsection{8.2.33,CBL_GC_WAITPID} +@newsubsection{CBL_GC_WAITPID} @diagram{CBL_GC_WAITPID Built-In Subroutine,SS-CBL_GC_WAITPID,SS-CBL_GC_WAITPID,None} @code{CBL_GC_WAITPID} allows you to wait until another system process ended. @@ -3167,7 +3167,7 @@ DISPLAY 'CBL_GC_WAITPID ended with status: ' WAIT-STS @comment ** 8.2.34 CBL_GET_CSR_POS ** @comment ********************************************************************* @page -@newsubsection{8.2.34,CBL_GET_CSR_POS} +@newsubsection{CBL_GET_CSR_POS} @diagram{CBL_GET_CSR_POS Built-In Subroutine,SS-CBL_GET_CSR_POS,SS-CBL_GET_CSR_POS,None} This subroutine will retrieve the current cursor location on the screen, returning a 2-byte value into the supplied @var{cursor-locn-buffer}. The first byte of @var{cursor-locn-buffer} will receive the current line (row) location while the second receives the current column location. @@ -3186,7 +3186,7 @@ Values of 1 (Line) and 1 (column) will be returned if GnuCOBOL was not generated @comment ** 8.2.35 CBL_GET_CURRENT_DIR ** @comment ********************************************************************* @page -@newsubsection{8.2.35,CBL_GET_CURRENT_DIR} +@newsubsection{CBL_GET_CURRENT_DIR} @diagram{CBL_GET_CURRENT_DIR Built-In Subroutine,SS-CBL_GET_CURR_DIR,SS-CBL_GET_CURR_DIR,None} This retrieves the fully-qualified pathname of the current directory, saving up to @var{length} characters of that name into @var{buffer}. @@ -3205,7 +3205,7 @@ If the routine is successful, a value of 0 will be returned to the @comment ** 8.2.36 CBL_GET_SCR_SIZE ** @comment ********************************************************************* @page -@newsubsection{8.2.36,CBL_GET_SCR_SIZE} +@newsubsection{CBL_GET_SCR_SIZE} @diagram{CBL_GET_SCR_SIZE Built-In Subroutine,SS-CBL_GET_SCR_SIZE,SS-CBL_GET_SCR_SIZE,None} Use this subroutine to retrieve the current console screen size. @@ -3227,7 +3227,7 @@ Zero values will be returned if the screen has not been initialized and values o @comment ** 8.2.37 CBL_IMP ** @comment ********************************************************************* @page -@newsubsection{8.2.37,CBL_IMP} +@newsubsection{CBL_IMP} @diagram{CBL_IMP Built-In Subroutine,SS-CBL_IMP,SS-CBL_IMP,None} @multitable @columnfractions 0.3 0.7 @item @@ -3255,7 +3255,7 @@ A result of zero will be passed back in the @comment ** 8.2.38 CBL_NIMP ** @comment ********************************************************************* @page -@newsubsection{8.2.38,CBL_NIMP} +@newsubsection{CBL_NIMP} @diagram{CBL_NIMP Built-In Subroutine,SS-CBL_NIMP,SS-CBL_NIMP,None} @multitable @columnfractions 0.3 0.7 @item @@ -3283,7 +3283,7 @@ A result of zero will be passed back in the @comment ** 8.2.39 CBL_NOR ** @comment ********************************************************************* @page -@newsubsection{8.2.39,CBL_NOR} +@newsubsection{CBL_NOR} @diagram{CBL_NOR Built-In Subroutine,SS-CBL_NOR,SS-CBL_NOR,None} @multitable @columnfractions 0.3 0.7 @item @@ -3311,7 +3311,7 @@ A result of zero will be passed back in the @comment ** 8.2.40 CBL_NOT ** @comment ********************************************************************* @page -@newsubsection{8.2.40,CBL_NOT} +@newsubsection{CBL_NOT} @diagram{CBL_NOT Built-In Subroutine,SS-CBL_NOT,SS-CBL_NOT,None} This subroutine ``flips'' the left-most 8*@var{byte-length} bits of @var{item-1}, changing 0 bits to 1, and 1 bits to 0. The changes are made directly im @var{item-1}. @@ -3327,7 +3327,7 @@ A result of zero will be passed back in the @comment ** 8.2.42 CBL_OPEN_FILE ** @comment ********************************************************************* @page -@newsubsection{8.2.42,CBL_OPEN_FILE} +@newsubsection{CBL_OPEN_FILE} @diagram{CBL_OPEN_FILE Built-In Subroutine,SS-CBL_OPEN_FILE,SS-CBL_OPEN_FILE,None} This routine opens an existing file for use as a byte-stream file usable by CBL_WRITE_FILE or CBL_READ_FILE. @@ -3356,7 +3356,7 @@ A @comment ** 8.2.43 CBL_OR ** @comment ********************************************************************* @page -@newsubsection{8.2.43,CBL_OR} +@newsubsection{CBL_OR} @diagram{CBL_OR Built-In Subroutine,SS-CBL_OR,SS-CBL_OR,None} @multitable @columnfractions 0.3 0.7 @item @@ -3384,7 +3384,7 @@ A result of zero will be passed back in the @comment ** 8.2.44 CBL_READ_FILE ** @comment ********************************************************************* @page -@newsubsection{8.2.44,CBL_READ_FILE} +@newsubsection{CBL_READ_FILE} @diagram{CBL_READ_FILE Built-In Subroutine,SS-CBL_READ_FILE,SS-CBL_READ_FILE,None} This routine reads @var{nbytes} of data starting at byte number @var{offset} from the byte-stream file defined by @var{handle} into @var{buffer}. @@ -3401,7 +3401,7 @@ Upon completion, the @comment ** 8.2.45 CBL_READ_KBD_CHAR ** @comment ********************************************************************* @page -@newsubsection{8.2.45,CBL_READ_KBD_CHAR} +@newsubsection{CBL_READ_KBD_CHAR} @diagram{CBL_READ_KBD_CHAR Build-In Subroutine,SS-CBL_READ_KBD_CHAR,SS-CBL_READ_KBD_CHAR,None} Waits until a character is typed from the terminal and then read it with no echo. @@ -3416,7 +3416,7 @@ If @code{RETURNING} is not used the @code{RETURN-CODE} special register receives @comment ** 8.2.46 CBL_RENAME_FILE ** @comment ********************************************************************* @page -@newsubsection{8.2.46,CBL_RENAME_FILE} +@newsubsection{CBL_RENAME_FILE} @diagram{CBL_RENAME_FILE Built-In Subroutine,SS-CBL_RENAME_FILE,SS-CBL_RENAME_FILE,None} You may use this subroutine to rename a file. @@ -3430,7 +3430,7 @@ If the attempt to move the file fails (for example, it doesn't exist), the @comment ** 8.2.47 CBL_SET_CSR_POS ** @comment ********************************************************************* @page -@newsubsection{8.2.47,CBL_SET_CSR_POS} +@newsubsection{CBL_SET_CSR_POS} @diagram{CBL_SET_CSR_POS Build-In Subroutine,SS-CBL_SET_CSR_POS,SS-CBL_SET_CSR_POS,None} Set current cursor position on terminal. @@ -3449,7 +3449,7 @@ The following is a typical @var{cursor-locn-buffer} definition: @comment ** 8.2.48 CBL_SET_SCR_SIZE ** @comment ********************************************************************* @page -@newsubsection{8.2.48,CBL_SET_SCR_SIZE} +@newsubsection{CBL_SET_SCR_SIZE} @diagram{CBL_SET_SRC_SIZE Built-In Subroutine,SS-CBL_SET_SCR_SIZE,SS-CBL_SET_SCR_SIZE,None} Use this subroutine to set the current console screen size. @@ -3473,7 +3473,7 @@ Zero values will be returned if the screen has not been initialized and values o @comment ** 8.2.49 CBL_TOLOWER ** @comment ********************************************************************* @page -@newsubsection{8.2.49,CBL_TOLOWER} +@newsubsection{CBL_TOLOWER} @diagram{CBL_TOLOWER Built-In Subroutine,SS-CBL_TOLOWER,SS-CBL_TOLOWER,None} This routine will convert the first @var{convert-length} (a numeric literal or data item) characters of @var{data-item} (an alpha-numeric identifier) to lower-case. @@ -3484,7 +3484,7 @@ If @var{convert-length} is negative or zero, no conversion will be performed. @comment ** 8.2.50 CBL_TOUPPER ** @comment ********************************************************************* @page -@newsubsection{8.2.50,CBL_TOUPPER} +@newsubsection{CBL_TOUPPER} @diagram{CBL_TOUPPER Built-In Subroutine,SS-CBL_TOUPPER,SS-CBL_TOUPPER,None} This routine will convert the first @var{convert-length} (a numeric literal or data item) characters of @var{data-item} (an alpha-numeric identifier) to upper-case. @@ -3495,7 +3495,7 @@ If @var{convert-length} is negative or zero, no conversion will be performed. @comment ** 8.2.51 CBL_WRITE_FILE ** @comment ********************************************************************* @page -@newsubsection{8.2.51,CBL_WRITE_FILE} +@newsubsection{CBL_WRITE_FILE} @diagram{CBL_WRITE_FILE Built-In Subroutine,SS-CBL_WRITE_FILE,SS-CBL_WRITE_FILE,None} This routine writes @var{nbytes} of data from @var{buffer} to the byte-stream file defined by @var{handle} starting at byte number @var{offset} within the file. @@ -3512,7 +3512,7 @@ Upon completion, the @comment ** 8.2.52 CBL_XOR ** @comment ********************************************************************* @page -@newsubsection{8.2.52,CBL_XOR} +@newsubsection{CBL_XOR} @diagram{CBL_XOR Built-In Subroutine,SS-CBL_XOR,SS-CBL_XOR,None} @multitable @columnfractions 0.3 0.7 @item @@ -3539,7 +3539,7 @@ A result of zero will be passed back in the @comment ** 8.2.53 SYSTEM ** @comment ********************************************************************* @page -@newsubsection{8.2.53,SYSTEM} +@newsubsection{SYSTEM} @diagram{SYSTEM Built-In Subroutine,SS-SYSTEM,SS-SYSTEM,None} This subroutine submits @var{command} (an alphanumeric literal or data item) to a command shell for execution as if it were typed into a console/terminal window. @@ -3558,7 +3558,7 @@ The exit status of the executed command will be available in the @code{RETURN-CO @comment ** 8.2.54 X"91" ** @comment ********************************************************************* @page -@newsubsection{8.2.54,X"91"} +@newsubsection{X"91"} @diagram{X"91" Built-In Subroutine,SS-X91,SS-X91,None} The original Micro Focus version of this routine is capable of providing a wide variety of functions. GnuCOBOL supports just three of them: @itemize @bullet @@ -3602,20 +3602,20 @@ Retrieves the number of arguments passed to the program executing the @code{CALL @comment ** 8.2.55 X"E4" ** @comment ********************************************************************* @page -@newsubsection{8.2.55,X"E4"} +@newsubsection{X"E4"} @diagram{X"E4" Built-In Subroutine,SS-XE4,SS-XE4,None} Use @code{X"E4"} to clear the screen. There are no arguments and no returned value. @comment ********************************************************************* @comment ** 8.2.56 X"E5" ** @comment ********************************************************************* -@newsubsection{8.2.56,X"E5"} +@newsubsection{X"E5"} @diagram{X"E5" Built-In Subroutine,SS-XE5,SS-XE5,None} The @code{X"E5"} routine will sound the PC ``bell''. There are no arguments and no returned value. @comment ********************************************************************* @comment ** 8.2.57 X"F4" ** @comment ********************************************************************* @page -@newsubsection{8.2.57,X"F4"} +@newsubsection{X"F4"} @diagram{X"F4" Built-In Subroutine,SS-XF4,SS-XF4,None} This routine packs the low-order (rightmost) bit from each of the eight 1-byte items in @var{table} into the corresponding bit positions of the single-byte data item @var{byte}. @@ -3633,7 +3633,7 @@ Typically, table is defined similarly to the following: @comment ** 8.2.58 X"F5" ** @comment ********************************************************************* @page -@newsubsection{8.2.58,X"F5"} +@newsubsection{X"F5"} @diagram{X"F5" Built-In Subroutine,SS-XF5,SS-XF5,None} This routine unpacks each bit of the single-byte data item @var{byte} into the low-order (rightmost) bit of each of the corresponding eight 1-byte items in @var{table}. The other seven bit positions of each of the first eight entries in @var{table} will be set to zero. diff --git a/guide/9.texi b/guide/9.texi index e7a3112..0aa012f 100644 --- a/guide/9.texi +++ b/guide/9.texi @@ -1,26 +1,26 @@ @comment ********************************************************************* @comment ** 9. Report Writer Usage ** @comment ********************************************************************* -@newchapter{9,Report Writer Usage} +@newchapter{Report Writer Usage} @menu -* 9.1: RWCS Lexicon. -* 9.2: The Anatomy of a Report. -* 9.3: The Anatomy of a Report Page. -* 9.4: How RWCS Builds Report Pages. -* 9.5: Control Hierarchy. -* 9.6: An Example. +* RWCS Lexicon. +* The Anatomy of a Report. +* The Anatomy of a Report Page. +* How RWCS Builds Report Pages. +* Control Hierarchy. +* An Example. @detailmenu -* 9.6.1: Data. -* 9.6.2: Program. -* 9.6.3: Generated Report Pages. +* Data. +* Program. +* Generated Report Pages. @end detailmenu -* 9.7: Control Hierarchy (Revisited). -* 9.8: Turning PHYSICAL Page Formatting Into LOGICAL Formatting. +* Control Hierarchy (Revisited). +* Turning PHYSICAL Page Formatting Into LOGICAL Formatting. @end menu @comment ********************************************************************* @comment ** 9.1 RWCS Lexicon ** @comment ********************************************************************* -@newsection{9.1,RWCS Lexicon} +@newsection{RWCS Lexicon} There are a number of terms that describe various aspects of the operation of the Report Writer Control System (RWCS). Understanding the meanings of these terms is vital to developing an understanding of the subject. @table @i @item Control Break @@ -64,7 +64,7 @@ A report group that occurs only once in an RWCS-generated report --- as the very @comment ********************************************************************* @comment ** 9.2 The Anatomy of a Report ** @comment ********************************************************************* -@newsection{9.2,The Anatomy of a Report} +@newsection{The Anatomy of a Report} Every report has the same basic structure, as shown here, even though not all reports will have all of the groups shown. In fact, it is a very unusual report indeed that actually has every one of these groups: @itemize @bullet @item REPORT HEADING @@ -86,7 +86,7 @@ The management of paging, enforcement of the @i{groups cannot span pages} rule a @comment ********************************************************************* @comment ** 9.3 The Anatomy of a Report Page ** @comment ********************************************************************* -@newsection{9.3,The Anatomy of a Report Page} +@newsection{The Anatomy of a Report Page} Each page of a report is divided into as many as five (5) areas, as shown in the following diagram. @format @@ -139,7 +139,7 @@ Footing Area --- An exception to this is the situation where the report footing @comment ********************************************************************* @comment ** 9.4 How RWCS Builds Report Pages ** @comment ********************************************************************* -@newsection{9.4,How RWCS Builds Report Pages} +@newsection{How RWCS Builds Report Pages} A report created via a @statementref{WRITE} will contain carriage-control information. Most notably, @sc{ASCII} form-feed characters (X'0C') will be written to the report file to support the statement's @code{ADVANCING PAGE} option. Whether the data for a report line created via @code{ADVANCING PAGE} occurs @i{before} or @i{after} the form-feed character depends upon whether the programmer coded @code{WRITE @var{record-name} BEFORE ADVANCING PAGE} or @code{WRITE @var{record-name} AFTER ADVANCING PAGE}, respectively. The GnuCOBOL implementation of RWCS does not issue any carriage-control information to the report files it produces --- instead, it relies upon the information coded in the @code{RD} for the report (specifically the @code{PAGE LIMITS} and related options) and its internally-generated and managed @@ -191,7 +191,7 @@ Using @var{identifier} rather than @var{integer} specifications in the @code{RD} @comment ********************************************************************* @comment ** 9.5 Control Hierarchy ** @comment ********************************************************************* -@newsection{9.5,Control Hierarchy} +@newsection{Control Hierarchy} Every report that employs control breaks has a natural hierarchy of those control breaks based upon the manner in which the data the report is being generated from is sorted. This concept is best understood using an example which assumes a COBOL program to process sales data collected from every computerized cash register across a chain of stores having multiple departments is being developed. The application that collects data from the various cash registers at each store will generate data records that look like this to a COBOL program: @@ -276,17 +276,17 @@ Defining a control hierarchy (via @code{CONTROLS ARE}) that does not match the a @comment ********************************************************************* @comment ** 9.6 An Example ** @comment ********************************************************************* -@newsection{9.6,An Example} +@newsection{An Example} This section contains an example of the RWCS at work. The complete program, presented here, is a stripped-down version of a program I have used to generate a report for a class I teach on PC hardware. This report will provide benchmark statistics on a variety of popular AMD and Intel CPUs. The data for the report was obtained from the website @url{www.cpubenchmark.net} in December of 2013. By the time you are reading this, that data will most likely have become rather out of date, but it illustrates RWCS well enough. @menu -* 9.6.1: Data. -* 9.6.2: Program. -* 9.6.3: Generated Report Pages. +* Data. +* Program. +* Generated Report Pages. @end menu @comment ********************************************************************* @comment ** 9.6.1 Data ** @comment ********************************************************************* -@newsubsection{9.6.1,Data} +@newsubsection{Data} Here is the data that the program will be reading. Each record reflects the aggregated benchmark scoring for one particular CPU, as scores for benchmarks against that CPU have been reported to the @url{cpubenchmark.net} website by their PassMark benchmark software. The data consists of four fields. Fields are separated from one another by a single comma. The descriptions of the fields are as follows: @table @b @item Benchmark Score @@ -386,7 +386,7 @@ For the sake of brevity, this document lists the data in three columns. @comment ********************************************************************* @comment ** 9.6.2 Program ** @comment ********************************************************************* -@newsubsection{9.6.2,Program} +@newsubsection{Program} Here is the program that will be producing the report. Pay attention to how the data is sorted and how the control hierarchy (@code{CONTROLS ARE}) relates to the @code{SORT}. @example @@ -601,7 +601,7 @@ END DECLARATIVES. @comment ********************************************************************* @comment ** 9.6.3 Generated Report Pages ** @comment ********************************************************************* -@newsubsection{9.6.3,Generated Report Pages} +@newsubsection{Generated Report Pages} Finally, here's the report the program generates! @example @@ -911,7 +911,7 @@ ____________________________________________ @comment ********************************************************************* @comment ** 9.7 Control Hierarchy (Revisited) ** @comment ********************************************************************* -@newsection{9.7,Control Hierarchy (Revisited)} +@newsection{Control Hierarchy (Revisited)} The sample program just discussed presents a great opportunity to show what can happen if you don't define the control hierarchy of a report properly. I changed the @code{CONTROLS ARE} clause on the sample program from this: @@ -1012,7 +1012,7 @@ ____________________________________________ @comment ********************************************************************* @comment ** 9.8 Turning PHYSICAL Page Formatting Into LOGICAL Formatting ** @comment ********************************************************************* -@newsection{9.8,Turning PHYSICAL Page Formatting Into LOGICAL Formatting} +@newsection{Turning PHYSICAL Page Formatting Into LOGICAL Formatting} You can trick RWCS into using the @code{PAGE LIMIT} values as logical specifications rather than physical ones quite easily --- simply include an @sc{ASCII} form-feed (@code{X'0C'}) character into your page heading design! Here's how the sample program shown earlier could be easily modified: Simply Change This@dots{} diff --git a/guide/A.texi b/guide/A.texi index 609cfc0..437f103 100644 --- a/guide/A.texi +++ b/guide/A.texi @@ -1,7 +1,7 @@ @comment ********************************************************************* @comment ** A. Glossary of Terms ** @comment ********************************************************************* -@newappendix{A,Glossary of Terms} +@newappendix{Glossary of Terms} @table @asis @item @itemdfn{Alphabetic Data Item} A data item whose @code{PICTURE} clause allows it to contain only upper- and/or lower-case letters. @xref{PICTURE}. @@ -105,7 +105,7 @@ These are data items a COBOL program will be working with. The vast majority of @anchor{Imperative Statement}Either a statement that begins with a non decision-making verb and specifies an unconditional action to be taken or a conditional verb such as @code{IF} or @code{EVALUATE}, delimited by its explicit scope terminator (such as @code{END-IF} or @code{END-EVALUATE}). An imperative statement can consist of a sequence of imperative statements. @item @itemdfn{Intrinsic Function} -A built-in routine that accepts arguments and returns a value; syntactically, these may be used most places where GnuCOBOL identifiers are valid. @xref{Intrinsic Functions}, for documentation on all the GnuCOBOL intrinsic functions. +A built-in routine that accepts arguments and returns a value; syntactically, these may be used most places where GnuCOBOL identifiers are valid. @xref{List of Intrinsic Functions}, for documentation on all the GnuCOBOL intrinsic functions. @item @itemdfn{Level Number} A 1- or 2-digit number that indicates the hierarchical position of a data item in a group item or the special properties of a data description entry. diff --git a/guide/B.texi b/guide/B.texi index eeeecf7..f9ff5ce 100644 --- a/guide/B.texi +++ b/guide/B.texi @@ -1,7 +1,7 @@ @comment ********************************************************************* @comment ** B. Reserved Word Lists ** @comment ********************************************************************* -@newappendix{B,Reserved Word List} +@newappendix{Reserved Word List} See Appendix C for the complete lists of ALL reserved words of all types. @iftex @sp 3 diff --git a/guide/C.texi b/guide/C.texi index 3d356a5..4128e81 100644 --- a/guide/C.texi +++ b/guide/C.texi @@ -1,7 +1,7 @@ @comment ********************************************************************* @comment ** C. Word Lists, by feature and function. ** @comment ********************************************************************* -@newappendix{C1, Grouped Word Lists by feature and function} +@newappendix{Grouped Word Lists by feature and function} The following is the complete list of ALL reserved words @idx{Reserved Words} in the @value{BUILD} build of GnuCOBOL @value{VERSION}. Even though the functionality behind some of these words may not be implemented in this version of GnuCOBOL, none may be used as any user-defined name. This list includes ALL reserved, intrinsics, mnemonics and system and shows some 1100+ words in total. In addition there are the arithmetic and relational symbols see 1.3.15 as well as extra words that can be added and existing words removed by the use of the --std file content see the specific one used for each sub-set. @@ -17,28 +17,28 @@ You can get the list for a given @var{dialect} by calling @include cbrese.tex -@newappendix{C2, Intrinsic Functions} +@newappendix{List of Intrinsic Functions} The following list of intrinsic functions was extracted from @code{cobc --list-intrinsics} and shows the names of the available functions, an implementation note and the number of parameters. @include cbintr.tex -@newappendix{C3, System routines} +@newappendix{System routines} The following list of system routines was extracted from @code{cobc --list-system} and shows the names of the available system routines along with the number of parameters. @include cbsyst.tex -@newappendix{C4, System names} +@newappendix{System names} The following list of system names was extracted from @code{cobc --list-mnemonics} and shows the system names categorized by their type. @include cbmnem.tex -@newappendix{C5, Exceptions} +@newappendix{Exceptions} The following list of exceptions names was extracted from @code{cobc --list-exceptions} and shows the names by type. diff --git a/guide/D.texi b/guide/D.texi index 486de50..d5ad4fc 100644 --- a/guide/D.texi +++ b/guide/D.texi @@ -1,7 +1,7 @@ @comment ********************************************************************* @comment ** D. GNU Free Documentation License ** @comment ********************************************************************* -@newappendix{D,GNU Free Documentation License} +@newappendix{GNU Free Documentation License} @include fdl.texi @iftex @sp 3 diff --git a/guide/E.texi b/guide/E.texi index 2c88fdd..5794fdc 100644 --- a/guide/E.texi +++ b/guide/E.texi @@ -1,7 +1,7 @@ @comment ********************************************************************* @comment ** E. Summary of Document Changes ** @comment ********************************************************************* -@newappendix{E,Summary of Document Changes} +@newappendix{Summary of Document Changes} GnuCOBOL is an ever-evolving tool. While all reasonable attempts will be made to maintain the currency of the information in this document, neither the author of this document nor the authors of the GnuCOBOL software extend any warranties of any kind for this document or for the information contained therein. 7th Edition diff --git a/guide/F1.texi b/guide/F1.texi index d50424f..dc65085 100644 --- a/guide/F1.texi +++ b/guide/F1.texi @@ -2,7 +2,7 @@ @comment ** F1. Summary of Compiler Changes since 2009 and version v1.1 *** @comment ****************************************************************** -@newappendix{F1,Summary of Compiler Changes since 2009 and version v1-1} +@newappendix{Summary of Compiler Changes since 2009 and version v1-1} To GnuCOBOL Compiler v2.2. Taken from Grammar Changelog Sept 2017. diff --git a/guide/Macros.texi b/guide/Macros.texi index e19efeb..e4e5f6c 100644 --- a/guide/Macros.texi +++ b/guide/Macros.texi @@ -214,13 +214,13 @@ @comment | concept index and page headings and footings will be updated to | @comment | reflect the new appendix. | @comment +-------------------------------------------------------------------+ -@macro newappendix {letter,name} +@macro newappendix {name} @sp 1 @set NEWSYNTAX On -@node Appendix \letter\ - \name\ -@unnumbered Appendix \letter\ - \name\ +@node \name\ +@appendix \name\ @idx{\name\} -@set CHAPNAME Appendix \letter\ - \name\ +@set CHAPNAME Appendix \name\ @end macro @comment +-------------------------------------------------------------------+ @comment | MACRO: newappsec{no,nodename} | @@ -229,12 +229,12 @@ @comment | given the specified "nodename" as its title and will have a node | @comment | named "nodename" created for it. | @comment +-------------------------------------------------------------------+ -@macro newappsec {no,name} +@macro newappsec {name} @sp 1 @idx{\name\} @set NEWSYNTAX On @node \name\ -@unnumberedsec \no\. \name\ +@appendixsec \name\ @end macro @comment +-------------------------------------------------------------------+ @comment | MACRO: newchapter{no,nodename} | @@ -245,13 +245,13 @@ @comment | concept index and page headings and footings will be updated to | @comment | reflect the new chapter. | @comment +-------------------------------------------------------------------+ -@macro newchapter {no,name} +@macro newchapter {name} @sp 1 @set NEWSYNTAX On @node \name\ -@unnumbered \no\. \name\ +@chapter \name\ @idx{\name\} -@set CHAPNAME Chapter \no\ - \name\ +@set CHAPNAME Chapter \name\ @end macro @comment +-------------------------------------------------------------------+ @comment | MACRO: newsection{no,nodename} | @@ -260,12 +260,12 @@ @comment | "nodename" as its title and will have a node named "nodename" | @comment | created for it. | @comment +-------------------------------------------------------------------+ -@macro newsection {no,name} +@macro newsection {name} @sp 1 @idx{\name\} @set NEWSYNTAX On @node \name\ -@unnumberedsec \no\. \name\ +@section \name\ @end macro @comment +-------------------------------------------------------------------+ @comment | MACRO: newsubsection{no,nodename} | @@ -274,12 +274,12 @@ @comment | specified "nodename" as its title and will have a node named | @comment | "nodename" created for it. | @comment +-------------------------------------------------------------------+ -@macro newsubsection {no,name} +@macro newsubsection {name} @sp 1 @idx{\name\} @set NEWSYNTAX On @node \name\ -@unnumberedsubsec \no\. \name\ +@subsection \name\ @end macro @comment +-------------------------------------------------------------------+ @comment | MACRO: newunit{no,nodename} | @@ -288,12 +288,12 @@ @comment | specified "nodename" as its title and will have a node named | @comment | "nodename" created for it. | @comment +-------------------------------------------------------------------+ -@macro newunit {no,name} +@macro newsubsubsection {name} @sp 1 @idx{\name\} @set NEWSYNTAX On @node \name\ -@unnumberedsubsubsec \no\. \name\ +@subsubsection \name\ @end macro @comment +-------------------------------------------------------------------+ @comment | MACRO: registertext{xxxxx} | diff --git a/guide/gnucobpg.texi b/guide/gnucobpg.texi index 001b4db..a4c53b9 100644 --- a/guide/gnucobpg.texi +++ b/guide/gnucobpg.texi @@ -97,320 +97,29 @@ This manual documents the @value{BUILD} build of GnuCOBOL @value{VERSION}. @menu List of Chapters and Appendices: -* 1: Introduction. -* 2: COBOL Fundamentals. -* 3: CDF - Compiler Directing Facility. -* 4: IDENTIFICATION DIVISION. -* 5: ENVIRONMENT DIVISION. -* 6: DATA DIVISION. -* 7: PROCEDURE DIVISION. -* 8: Functions. -* 9: Report Writer Usage. -* 10: Interfacing With The OS. -* 11: Sub-Programming. -* 12: Programming Style Suggestions. -* 13: Programming for XFD. -* A: Appendix A - Glossary of Terms. -* B: Appendix B - Reserved Word List. -* C1: Appendix C1 - Grouped Word Lists by feature and function. -* C2: Appendix C2 - Intrinsic Functions. -* C3: Appendix C3 - System routines. -* C4: Appendix C4 - System names. -* C5: Appendix C5 - Exceptions. -* D: Appendix D - GNU Free Documentation License. -* E: Appendix E - Summary of Document Changes. -@comment* F4: Appendix F4 - Summary of Compiler Changes to v4 -@comment* F3: Appendix F3 - Summary of Compiler Changes to v3.1.1 -@comment* F2: Appendix F2 - Summary of Compiler Changes after GnuCOBOL Compiler v2.2. -@comment* F1: Appendix F1 - Summary of Compiler Changes since 2009 and version v1-1. -* I: INDEX. +* Introduction:: +* COBOL Fundamentals. +* CDF - Compiler Directing Facility. +* IDENTIFICATION DIVISION. +* ENVIRONMENT DIVISION. +* DATA DIVISION. +* PROCEDURE DIVISION. +* Functions. +* Report Writer Usage. +* Interfacing With The OS. +* Sub-Programming. +* Programming Style Suggestions. +* Programming for XFD. +* Glossary of Terms. +* Reserved Word List. +* Grouped Word Lists by feature and function. +* List of Intrinsic Functions. +* System routines. +* System names. +* Exceptions. +* GNU Free Documentation License. +* Summary of Document Changes. -Full Contents: - -@detailmenu -* 1: Introduction. -* 1.1: Additional Reference Sources. -* 1.2: Introducing COBOL. -* 1.2.2: Why YOU Should Learn COBOL. -* 1.2.2: Programmer Productivity. -* 1.3: So What is GnuCOBOL?. - -* 2: COBOL Fundamentals. -* 2.1: The COBOL Language - The Basics. -* 2.1.1: Language Reserved Words. -* 2.1.2: User-Defined Words. -* 2.1.3: Case Insensitivity. -* 2.1.4: Readability of Programs. -* 2.1.5: Divisions Organize Programs. -* 2.1.6: Copybooks. -* 2.1.7: Structured Data. -* 2.1.8: Files. -* 2.1.9: Table Handling. -* 2.1.10: Sorting and Merging Data. -* 2.1.11: String Manipulation. -* 2.1.12: Screen Formatting Features. -* 2.1.12.2: A Sample Screen. -* 2.1.12.2: Color Palette and Video Attributes. -* 2.1.13: Report Writer Features. -* 2.1.14: Data Initialization. -* 2.1.15: Syntax Diagram Conventions. -* 2.1.16: Format of Program Source Lines. -* 2.1.17: Program Structure. -* 2.1.18: Comments. -* 2.1.19: Literals. -* 2.1.19.1: Numeric Literals. -* 2.1.19.2: Alphanumeric Literals. -* 2.1.19.3: Figurative Constants. -* 2.1.20: Punctuation. -* 2.1.21: Interfacing to Other Environments. -* 2.2: The COBOL Language - Advanced Techniques. -* 2.2.1: Table References. -* 2.2.2: Qualification of Data Names. -* 2.2.3: Reference Modifiers. -* 2.2.4: Arithmetic Expressions. -* 2.2.5: Conditional Expressions. -* 2.2.5.1: Condition Names. -* 2.2.5.2: Class Conditions. -* 2.2.5.3: Sign Conditions. -* 2.2.5.4: Switch-Status Conditions. -* 2.2.5.5: Relation Conditions. -* 2.2.5.6: Combined Conditions. -* 2.2.5.7: Negated Conditions. -* 2.2.6: Use of Periods. -* 2.2.7: Use of VERB/END-VERB Constructs. -* 2.2.8: Concurrent Access to Files. -* 2.2.8.1: File Sharing. -* 2.2.8.2: Record Locking. - -* 3: CDF - Compiler Directing Facility. -* 3.1 : >>CALL-CONVENTION. -* 3.2 : COPY. -* 3.3 : REPLACE. -* 3.4 : >>DEFINE. -* 3.5 : >>IF. -* 3.6 : >>SET. -* 3.7 : >>SOURCE. -* 3.8 : >>TURN. -* 3.9 : >>D. -* 3.10: >>DISPLAY. -* 3.11: >>PAGE. -* 3.12: >>LISTING. -* 3.13: >>LEAP-SECONDS. -* 3.14: $ Directives. - -* 4: IDENTIFICATION DIVISION. - -* 5: ENVIRONMENT DIVISION. -* 5.1: CONFIGURATION SECTION. -* 5.1.1: SOURCE-COMPUTER. -* 5.1.2: OBJECT-COMPUTER. -* 5.1.3: SPECIAL-NAMES. -* 5.1.3.1: Alphabet-Name-Clause. -* 5.1.3.2: Class-Definition-Clause. -* 5.1.3.3: Switch-Definition-Clause. -* 5.1.3.4: Symbolic-Characters-Clause. -* 5.1.4: REPOSITORY. -* 5.2: INPUT-OUTPUT SECTION. -* 5.2.1: SELECT. -* 5.2.1.1: ORGANIZATION SEQUENTIAL. -* 5.2.1.2: ORGANIZATION LINE SEQUENTIAL. -* 5.2.1.3: ORGANIZATION RELATIVE. -* 5.2.1.4: ORGANIZATION INDEXED. -* 5.2.2: SAME RECORD AREA. -* 5.2.3: MULTIPLE FILE. - -* 6: DATA DIVISION. -* 6.1: Data Definition Principles. -* 6.2: FILE SECTION. -* 6.2.2: File/Sort-Description. -* 6.2.2: FILE-SECTION-Data-Item. -* 6.3: WORKING-STORAGE SECTION. -* 6.4: LOCAL-STORAGE SECTION. -* 6.5: LINKAGE SECTION. -* 6.6: REPORT SECTION. -* 6.6.1: Report Group Definitions. -* 6.6.2: REPORT SECTION Data Items. -* 6.7: SCREEN SECTION. -* 6.8: Special Data Items. -* 6.8.1: 01-Level Constants. -* 6.8.2: 66-Level Data Items. -* 6.8.3: 77-Level Data Items. -* 6.8.4: 78-Level Data Items. -* 6.8.5: 88-Level Data Items. -* 6.9: Data Description Clauses. -* 6.9.1: ANY LENGTH. -* 6.9.1B: ANY NUMERIC. -* 6.9.2: AUTO. -* 6.9.3: AUTO-SKIP. -* 6.9.4: AUTOTERMINATE. -* 6.9.5: BACKGROUND-COLOR. -* 6.9.5B: BEFORE TIME. -* 6.9.6: BASED. -* 6.9.7: BEEP. -* 6.9.8: BELL. -* 6.9.9: BLANK. -* 6.9.10: BLANK WHEN ZERO. -* 6.9.11: BLINK. -* 6.9.12: COLUMN. -* 6.9.13: CONSTANT. -* 6.9.14: EMPTY-CHECK. -* 6.9.15: EXTERNAL. -* 6.9.16: ERASE. -* 6.9.17: FALSE. -* 6.9.18: FOREGROUND-COLOR. -* 6.9.19: FROM. -* 6.9.20: FULL. -* 6.9.21: GLOBAL. -* 6.9.22: GROUP INDICATE. -* 6.9.23: HIGHLIGHT. -* 6.9.24: JUSTIFIED. -* 6.9.25: LEFTLINE. -* 6.9.26: LENGTH-CHECK. -* 6.9.27: LINE. -* 6.9.27B: LOWER. -* 6.9.28: LOWLIGHT. -* 6.9.29: NEXT GROUP. -* 6.9.30: NO-ECHO. -* 6.9.30B: NO UPDATE. -* 6.9.31: OCCURS. -* 6.9.32: OVERLINE. -* 6.9.33: PICTURE. -* 6.9.34: PRESENT WHEN. -* 6.9.35: PROMPT. -* 6.9.36: PROTECTED. -* 6.9.37: REDEFINES. -* 6.9.38: RENAMES. -* 6.9.39: REQUIRED. -* 6.9.40: REVERSE-VIDEO. -* 6.9.41: SAME AS. -* 6.9.41B: SCROLL DOWN. -* 6.9.41C: SCROLL UP. -* 6.9.42: SECURE. -* 6.9.43: SIGN. -* 6.9.43B: SIZE. -* 6.9.44: SOURCE. -* 6.9.45: SUM. -* 6.9.46: SYNCHRONIZED. -* 6.9.46B: TIME OUT -* 6.9.47: TO. -* 6.9.48: TYPE. -* 6.9.49: TYPEDEF. -* 6.9.50: UNDERLINE. -* 6.9.50B: UPDATE. -* 6.9.50C: UPPER. -* 6.9.51: USAGE. -* 6.9.52: USING. -* 6.9.53: VALUE. - -* 7: PROCEDURE DIVISION. -* 7.1: PROCEDURE DIVISION USING. -* 7.2: PROCEDURE DIVISION CHAINING. -* 7.3: PROCEDURE DIVISION RETURNING. -* 7.4: PROCEDURE DIVISION Sections and Paragraphs. -* 7.5: DECLARATIVES. -* 7.6: Common Clauses on Executable Statements. -* 7.6.1: AT END + NOT AT END. -* 7.6.2: CORRESPONDING. -* 7.6.3: INVALID KEY + NOT INVALID KEY. -* 7.6.4: ON EXCEPTION + NOT ON EXCEPTION. -* 7.6.5: ON OVERFLOW + NOT ON OVERFLOW. -* 7.6.6: ON SIZE ERROR + NOT ON SIZE ERROR. -* 7.6.7: ROUNDED. -* 7.7: Special Registers. -* 7.8: GnuCOBOL Statements. - -* 8: Functions. -* 8.1: Intrinsic Functions. -* 8.2: Built-In System Subroutines. - -* 9: Report Writer Usage. -* 9.1: RWCS Lexicon. -* 9.2: The Anatomy of a Report. -* 9.3: The Anatomy of a Report Page. -* 9.4: How RWCS Builds Report Pages. -* 9.5: Control Hierarchy. -* 9.6: An Example. -* 9.6.1: Data. -* 9.6.2: Program. -* 9.6.3: Generated Report Pages. -* 9.7: Control Hierarchy (Revisited). -* 9.8: Turning PHYSICAL Page Formatting Into LOGICAL Formatting. - -* 10: Interfacing With The OS. -* 10.1: Compiling Programs. -* 10.1.1: cobc - The GnuCOBOL Compiler. -* 10.1.1,1: cobc option -Xref an example. -* 10.1.1,2: Cross Reference listing using cobxref. -* 10.1.2: Compilation Time Environment Variables. -* 10.1.3: Predefined Compilation Variables. -* 10.1.4: Locating Copybooks. -* 10.1.5: Compiler Configuration Files. -* 10.2: Running Programs. -* 10.2.1: Direct Execution. -* 10.2.2: Executing Dynamically-Loadable Libraries. -* 10.2.2.1: cobcrun - Command-line Execution. -* 10.2.2.2: Dynamically Loaded Subprograms. -* 10.2.3: Run Time Environment Variables. -* 10.2.3.1: General instructions -* 10.2.3.2: General Environment -* 10.2.3.3: Call Environment -* 10.2.3.4: File I/O -* 10.2.3.5: Screen I/O -* 10.2.3.6: Report I/O -* 10.2.3.7: File I/O Environment Variables and/or dictionary file - -* 10.2.4: Program Arguments. -* 10.3: Binary Truncation. - -* 11: Sub-Programming. -* 11.1: Subprogram Types. -* 11.2: Independent vs Contained vs Nested Subprograms. -* 11.3: Alternate Entry Points. -* 11.4: Dynamic vs Static Subprograms. -* 11.5: Subprogram Execution Flow. -* 11.5.1: Subroutine Execution Flow. -* 11.5.2: User-Defined Function Execution Flow. -* 11.6: Sharing Data Between Calling and Called Programs. -* 11.6.1: Subprogram Arguments. -* 11.6.1.1: Calling Program Considerations. -* 11.6.1.2: Called Program Considerations. -* 11.6.2: GLOBAL Data Items. -* 11.6.3: EXTERNAL Data Items. -* 11.7: Recursive Subprograms. -* 11.8: Combining GnuCOBOL and C Programs. -* 11.8.1: GnuCOBOL Run-Time Library Requirements. -* 11.8.2: String Allocation Differences Between GnuCOBOL and C. -* 11.8.3: Matching C Data Types with GnuCOBOL USAGE's. -* 11.8.4: GnuCOBOL Main Programs CALLing C Subprograms. -* 11.8.5: C Main Programs Calling GnuCOBOL Subprograms. - -* 12: Programming Style Suggestions. -* 12.1: Marking Changes in Programs. -* 12.2: Data Item Coding and Naming Conventions. -* 12.3: Table Subscripting versus Table Indexing. -* 12.4: Copybook Naming Conventions and Usage. -* 12.5: PROCEDURE DIVISION Sections Versus Paragraphs. -* 12.6: COMPUTE Versus ADD-SUBTRACT-MULTIPLY-DIVIDE. - -* 13: Programming for XFD. -* 13.1: GnuCobol use SQL for files. - -* A: Appendix A - Glossary of Terms. - -* B: Appendix B - Reserved Word List. - -* C1: Appendix C1 - Grouped Word Lists by feature and function. -* C2: Appendix C2 - Intrinsic Functions. -* C3: Appendix C3 - System routines. -* C4: Appendix C4 - System names. -* D: Appendix D - GNU Free Documentation License. -* E: Appendix E - Summary of Document Changes. -@comment* F4: Appendix F4 - Summary of Compiler Changes to v4 -@comment* F3: Appendix F3 - Summary of Compiler Changes to v3.1.1 -@comment* F2: Appendix F2 - Summary of Compiler Changes after GnuCOBOL Compiler v2.2. -@comment* F1: Appendix F1 - Summary of Compiler Changes since 2009 and version v1-1. - -@end detailmenu @end menu @c jkl @end ifinfo @settitle GnuCOBOL Programmer's Guide diff --git a/guide/gnucobpr.texi b/guide/gnucobpr.texi index b01db64..ad25e03 100644 --- a/guide/gnucobpr.texi +++ b/guide/gnucobpr.texi @@ -97,314 +97,314 @@ This manual documents the @value{BUILD} build of GnuCOBOL @value{VERSION}. @menu List of Chapters and Appendices: -* 1: Introduction. -* 2: COBOL Fundamentals. -* 3: CDF - Compiler Directing Facility. -* 4: IDENTIFICATION DIVISION. -* 5: ENVIRONMENT DIVISION. -* 6: DATA DIVISION. -* 7: PROCEDURE DIVISION. -* 8: Functions. -* 9: Report Writer Usage. -* 10: Interfacing With The OS. -* 11: Sub-Programming. -* 12: Programming Style Suggestions. -* 13: Programming for XFD. -* A: Appendix A - Glossary of Terms. -* B: Appendix B - Reserved Word List. -* C1: Appendix C1 - Grouped Word Lists by feature and function. -* C2: Appendix C2 - Intrinsic Functions. -* C3: Appendix C3 - System routines. -* C4: Appendix C4 - System names. -* D: Appendix D - GNU Free Documentation License. -* E: Appendix E - Summary of Document Changes. +* Introduction. +* COBOL Fundamentals. +* CDF - Compiler Directing Facility. +* IDENTIFICATION DIVISION. +* ENVIRONMENT DIVISION. +* DATA DIVISION. +* PROCEDURE DIVISION. +* Functions. +* Report Writer Usage. +* Interfacing With The OS. +* Sub-Programming. +* Programming Style Suggestions. +* Programming for XFD. +* Appendix A - Glossary of Terms. +* Appendix B - Reserved Word List. +* Appendix C1 - Grouped Word Lists by feature and function. +* Appendix C2 - Intrinsic Functions. +* Appendix C3 - System routines. +* Appendix C4 - System names. +* Appendix D - GNU Free Documentation License. +* Appendix E - Summary of Document Changes. @comment* F4: Appendix F4 - Summary of Compiler Changes to v4 @comment* F3: Appendix F3 - Summary of Compiler Changes to v3.1.1 @comment* F2: Appendix F2 - Summary of Compiler Changes after GnuCOBOL Compiler v2.2. @comment* F1: Appendix F1 - Summary of Compiler Changes since 2009 and version v1-1. -* I: INDEX. +* INDEX. Full Contents: @detailmenu -* 1: Introduction. -* 1.1: Additional Reference Sources. -* 1.2: Introducing COBOL. -* 1.2.2: Why YOU Should Learn COBOL. -* 1.2.2: Programmer Productivity. -* 1.3: So What is GnuCOBOL?. +* Introduction. +* Additional Reference Sources. +* Introducing COBOL. +* Why YOU Should Learn COBOL. +* Programmer Productivity. +* So What is GnuCOBOL?. -* 2: COBOL Fundamentals. -* 2.1: The COBOL Language - The Basics. -* 2.1.1: Language Reserved Words. -* 2.1.2: User-Defined Words. -* 2.1.3: Case Insensitivity. -* 2.1.4: Readability of Programs. -* 2.1.5: Divisions Organize Programs. -* 2.1.6: Copybooks. -* 2.1.7: Structured Data. -* 2.1.8: Files. -* 2.1.9: Table Handling. -* 2.1.10: Sorting and Merging Data. -* 2.1.11: String Manipulation. -* 2.1.12: Screen Formatting Features. -* 2.1.12.2: A Sample Screen. -* 2.1.12.2: Color Palette and Video Attributes. -* 2.1.13: Report Writer Features. -* 2.1.14: Data Initialization. -* 2.1.15: Syntax Diagram Conventions. -* 2.1.16: Format of Program Source Lines. -* 2.1.17: Program Structure. -* 2.1.18: Comments. -* 2.1.19: Literals. -* 2.1.19.1: Numeric Literals. -* 2.1.19.2: Alphanumeric Literals. -* 2.1.19.3: Figurative Constants. -* 2.1.20: Punctuation. -* 2.1.21: Interfacing to Other Environments. -* 2.2: The COBOL Language - Advanced Techniques. -* 2.2.1: Table References. -* 2.2.2: Qualification of Data Names. -* 2.2.3: Reference Modifiers. -* 2.2.4: Arithmetic Expressions. -* 2.2.5: Conditional Expressions. -* 2.2.5.1: Condition Names. -* 2.2.5.2: Class Conditions. -* 2.2.5.3: Sign Conditions. -* 2.2.5.4: Switch-Status Conditions. -* 2.2.5.5: Relation Conditions. -* 2.2.5.6: Combined Conditions. -* 2.2.5.7: Negated Conditions. -* 2.2.6: Use of Periods. -* 2.2.7: Use of VERB/END-VERB Constructs. -* 2.2.8: Concurrent Access to Files. -* 2.2.8.1: File Sharing. -* 2.2.8.2: Record Locking. +* COBOL Fundamentals. +* The COBOL Language - The Basics. +* Language Reserved Words. +* User-Defined Words. +* Case Insensitivity. +* Readability of Programs. +* Divisions Organize Programs. +* Copybooks. +* Structured Data. +* Files. +* Table Handling. +* Sorting and Merging Data. +* String Manipulation. +* Screen Formatting Features. +* A Sample Screen. +* Color Palette and Video Attributes. +* Report Writer Features. +* Data Initialization. +* Syntax Diagram Conventions. +* Format of Program Source Lines. +* Program Structure. +* Comments. +* Literals. +* Numeric Literals. +* Alphanumeric Literals. +* Figurative Constants. +* Punctuation. +* Interfacing to Other Environments. +* The COBOL Language - Advanced Techniques. +* Table References. +* Qualification of Data Names. +* Reference Modifiers. +* Arithmetic Expressions. +* Conditional Expressions. +* Condition Names. +* Class Conditions. +* Sign Conditions. +* Switch-Status Conditions. +* Relation Conditions. +* Combined Conditions. +* Negated Conditions. +* Use of Periods. +* Use of VERB/END-VERB Constructs. +* Concurrent Access to Files. +* File Sharing. +* Record Locking. -* 3: CDF - Compiler Directing Facility. -* 3.1 : >>CALL-CONVENTION. -* 3.2 : COPY. -* 3.3 : REPLACE. -* 3.4 : >>DEFINE. -* 3.5 : >>IF. -* 3.6 : >>SET. -* 3.7 : >>SOURCE. -* 3.8 : >>TURN. -* 3.9 : >>D. -* 3.10: >>DISPLAY. -* 3.11: >>PAGE. -* 3.12: >>LISTING. -* 3.13: >>LEAP-SECONDS. -* 3.14: $ Directives. +* CDF - Compiler Directing Facility. +* >>CALL-CONVENTION. +* COPY. +* REPLACE. +* >>DEFINE. +* >>IF. +* >>SET. +* >>SOURCE. +* >>TURN. +* >>D. +* >>DISPLAY. +* >>PAGE. +* >>LISTING. +* >>LEAP-SECONDS. +* $ Directives. -* 4: IDENTIFICATION DIVISION. +* IDENTIFICATION DIVISION. -* 5: ENVIRONMENT DIVISION. -* 5.1: CONFIGURATION SECTION. -* 5.1.1: SOURCE-COMPUTER. -* 5.1.2: OBJECT-COMPUTER. -* 5.1.3: SPECIAL-NAMES. -* 5.1.3.1: Alphabet-Name-Clause. -* 5.1.3.2: Class-Definition-Clause. -* 5.1.3.3: Switch-Definition-Clause. -* 5.1.3.4: Symbolic-Characters-Clause. -* 5.1.4: REPOSITORY. -* 5.2: INPUT-OUTPUT SECTION. -* 5.2.1: SELECT. -* 5.2.1.1: ORGANIZATION SEQUENTIAL. -* 5.2.1.2: ORGANIZATION LINE SEQUENTIAL. -* 5.2.1.3: ORGANIZATION RELATIVE. -* 5.2.1.4: ORGANIZATION INDEXED. -* 5.2.2: SAME RECORD AREA. -* 5.2.3: MULTIPLE FILE. +* ENVIRONMENT DIVISION. +* CONFIGURATION SECTION. +* SOURCE-COMPUTER. +* OBJECT-COMPUTER. +* SPECIAL-NAMES. +* Alphabet-Name-Clause. +* Class-Definition-Clause. +* Switch-Definition-Clause. +* Symbolic-Characters-Clause. +* REPOSITORY. +* INPUT-OUTPUT SECTION. +* SELECT. +* ORGANIZATION SEQUENTIAL. +* ORGANIZATION LINE SEQUENTIAL. +* ORGANIZATION RELATIVE. +* ORGANIZATION INDEXED. +* SAME RECORD AREA. +* MULTIPLE FILE. -* 6: DATA DIVISION. -* 6.1: Data Definition Principles. -* 6.2: FILE SECTION. -* 6.2.2: File/Sort-Description. -* 6.2.2: FILE-SECTION-Data-Item. -* 6.3: WORKING-STORAGE SECTION. -* 6.4: LOCAL-STORAGE SECTION. -* 6.5: LINKAGE SECTION. -* 6.6: REPORT SECTION. -* 6.6.1: Report Group Definitions. -* 6.6.2: REPORT SECTION Data Items. -* 6.7: SCREEN SECTION. -* 6.8: Special Data Items. -* 6.8.1: 01-Level Constants. -* 6.8.2: 66-Level Data Items. -* 6.8.3: 77-Level Data Items. -* 6.8.4: 78-Level Data Items. -* 6.8.5: 88-Level Data Items. -* 6.9: Data Description Clauses. -* 6.9.1: ANY LENGTH. -* 6.9.1B: ANY NUMERIC. -* 6.9.2: AUTO. -* 6.9.3: AUTO-SKIP. -* 6.9.4: AUTOTERMINATE. -* 6.9.5: BACKGROUND-COLOR. -* 6.9.5B: BEFORE TIME. -* 6.9.6: BASED. -* 6.9.7: BEEP. -* 6.9.8: BELL. -* 6.9.9: BLANK. -* 6.9.10: BLANK WHEN ZERO. -* 6.9.11: BLINK. -* 6.9.12: COLUMN. -* 6.9.13: CONSTANT. -* 6.9.14: EMPTY-CHECK. -* 6.9.15: EXTERNAL. -* 6.9.16: ERASE. -* 6.9.17: FALSE. -* 6.9.18: FOREGROUND-COLOR. -* 6.9.19: FROM. -* 6.9.20: FULL. -* 6.9.21: GLOBAL. -* 6.9.22: GROUP INDICATE. -* 6.9.23: HIGHLIGHT. -* 6.9.24: JUSTIFIED. -* 6.9.25: LEFTLINE. -* 6.9.26: LENGTH-CHECK. -* 6.9.27: LINE. -* 6.9.27B: LOWER. -* 6.9.28: LOWLIGHT. -* 6.9.29: NEXT GROUP. -* 6.9.30: NO-ECHO. -* 6.9.30B: NO UPDATE. -* 6.9.31: OCCURS. -* 6.9.32: OVERLINE. -* 6.9.33: PICTURE. -* 6.9.34: PRESENT WHEN. -* 6.9.35: PROMPT. -* 6.9.36: PROTECTED. -* 6.9.37: REDEFINES. -* 6.9.38: RENAMES. -* 6.9.39: REQUIRED. -* 6.9.40: REVERSE-VIDEO. -* 6.9.41: SAME. -* 6.9.41B: SCROLL DOWN. -* 6.9.41C: SCROLL UP. -* 6.9.42: SECURE. -* 6.9.43: SIGN. -* 6.9.43B: SIZE. -* 6.9.44: SOURCE. -* 6.9.45: SUM. -* 6.9.46: SYNCHRONIZED. -* 6.9.46B: TIME OUT -* 6.9.47: TO. -* 6.9.48: TYPE. -* 6.9.49: TYPEDEF. -* 6.9.50: UNDERLINE. -* 6.9.50B: UPDATE. -* 6.9.50C: UPPER. -* 6.9.51: USAGE. -* 6.9.52: USING. -* 6.9.53: VALUE. +* DATA DIVISION. +* Data Definition Principles. +* FILE SECTION. +* File/Sort-Description. +* FILE-SECTION-Data-Item. +* WORKING-STORAGE SECTION. +* LOCAL-STORAGE SECTION. +* LINKAGE SECTION. +* REPORT SECTION. +* Report Group Definitions. +* REPORT SECTION Data Items. +* SCREEN SECTION. +* Special Data Items. +* 01-Level Constants. +* 66-Level Data Items. +* 77-Level Data Items. +* 78-Level Data Items. +* 88-Level Data Items. +* Data Description Clauses. +* ANY LENGTH. +* ANY NUMERIC. +* AUTO. +* AUTO-SKIP. +* AUTOTERMINATE. +* BACKGROUND-COLOR. +* BEFORE TIME. +* BASED. +* BEEP. +* BELL. +* BLANK. +* BLANK WHEN ZERO. +* BLINK. +* COLUMN. +* CONSTANT. +* EMPTY-CHECK. +* EXTERNAL. +* ERASE. +* FALSE. +* FOREGROUND-COLOR. +* FROM. +* FULL. +* GLOBAL. +* GROUP INDICATE. +* HIGHLIGHT. +* JUSTIFIED. +* LEFTLINE. +* LENGTH-CHECK. +* LINE. +* LOWER. +* LOWLIGHT. +* NEXT GROUP. +* NO-ECHO. +* NO UPDATE. +* OCCURS. +* OVERLINE. +* PICTURE. +* PRESENT WHEN. +* PROMPT. +* PROTECTED. +* REDEFINES. +* RENAMES. +* REQUIRED. +* REVERSE-VIDEO. +* SAME. +* SCROLL DOWN. +* SCROLL UP. +* SECURE. +* SIGN. +* SIZE. +* SOURCE. +* SUM. +* SYNCHRONIZED. +* TIME OUT +* TO. +* TYPE. +* TYPEDEF. +* UNDERLINE. +* UPDATE. +* UPPER. +* USAGE. +* USING. +* VALUE. -* 7: PROCEDURE DIVISION. -* 7.1: PROCEDURE DIVISION USING. -* 7.2: PROCEDURE DIVISION CHAINING. -* 7.3: PROCEDURE DIVISION RETURNING. -* 7.4: PROCEDURE DIVISION Sections and Paragraphs. -* 7.5: DECLARATIVES. -* 7.6: Common Clauses on Executable Statements. -* 7.6.1: AT END + NOT AT END. -* 7.6.2: CORRESPONDING. -* 7.6.3: INVALID KEY + NOT INVALID KEY. -* 7.6.4: ON EXCEPTION + NOT ON EXCEPTION. -* 7.6.5: ON OVERFLOW + NOT ON OVERFLOW. -* 7.6.6: ON SIZE ERROR + NOT ON SIZE ERROR. -* 7.6.7: ROUNDED. -* 7.7: Special Registers. -* 7.8: GnuCOBOL Statements. +* PROCEDURE DIVISION. +* PROCEDURE DIVISION USING. +* PROCEDURE DIVISION CHAINING. +* PROCEDURE DIVISION RETURNING. +* PROCEDURE DIVISION Sections and Paragraphs. +* DECLARATIVES. +* Common Clauses on Executable Statements. +* AT END + NOT AT END. +* CORRESPONDING. +* INVALID KEY + NOT INVALID KEY. +* ON EXCEPTION + NOT ON EXCEPTION. +* ON OVERFLOW + NOT ON OVERFLOW. +* ON SIZE ERROR + NOT ON SIZE ERROR. +* ROUNDED. +* Special Registers. +* GnuCOBOL Statements. -* 8: Functions. -* 8.1: Intrinsic Functions. -* 8.2: Built-In System Subroutines. +* Functions. +* Intrinsic Functions. +* Built-In System Subroutines. -* 9: Report Writer Usage. -* 9.1: RWCS Lexicon. -* 9.2: The Anatomy of a Report. -* 9.3: The Anatomy of a Report Page. -* 9.4: How RWCS Builds Report Pages. -* 9.5: Control Hierarchy. -* 9.6: An Example. -* 9.6.1: Data. -* 9.6.2: Program. -* 9.6.3: Generated Report Pages. -* 9.7: Control Hierarchy (Revisited). -* 9.8: Turning PHYSICAL Page Formatting Into LOGICAL Formatting. +* Report Writer Usage. +* RWCS Lexicon. +* The Anatomy of a Report. +* The Anatomy of a Report Page. +* How RWCS Builds Report Pages. +* Control Hierarchy. +* An Example. +* Data. +* Program. +* Generated Report Pages. +* Control Hierarchy (Revisited). +* Turning PHYSICAL Page Formatting Into LOGICAL Formatting. -* 10: Interfacing With The OS. -* 10.1: Compiling Programs. -* 10.1.1: cobc - The GnuCOBOL Compiler. -* 10.1.1,1: cobc option -Xref an example. -* 10.1.1,2: Cross Reference listing using cobxref. -* 10.1.2: Compilation Time Environment Variables. -* 10.1.3: Predefined Compilation Variables. -* 10.1.4: Locating Copybooks. -* 10.1.5: Compiler Configuration Files. -* 10.2: Running Programs. -* 10.2.1: Direct Execution. -* 10.2.2: Executing Dynamically-Loadable Libraries. -* 10.2.2.1: cobcrun - Command-line Execution. -* 10.2.2.2: Dynamically Loaded Subprograms. -* 10.2.3: Run Time Environment Variables. -* 10.2.3.1: General instructions -* 10.2.3.2: General Environment -* 10.2.3.3: Call Environment -* 10.2.3.4: File I/O -* 10.2.3.5: Screen I/O -* 10.2.3.6: Report I/O -* 10.2.3.7: File I/O Environment Variables and/or dictionary file +* Interfacing With The OS. +* Compiling Programs. +* cobc - The GnuCOBOL Compiler. +* cobc option -Xref an example. +* Cross Reference listing using cobxref. +* Compilation Time Environment Variables. +* Predefined Compilation Variables. +* Locating Copybooks. +* Compiler Configuration Files. +* Running Programs. +* Direct Execution. +* Executing Dynamically-Loadable Libraries. +* cobcrun - Command-line Execution. +* Dynamically Loaded Subprograms. +* Run Time Environment Variables. +* General instructions +* General Environment +* Call Environment +* File I/O +* Screen I/O +* Report I/O +* File I/O Environment Variables and/or dictionary file -* 10.2.4: Program Arguments. -* 10.3: Binary Truncation. +* Program Arguments. +* Binary Truncation. -* 11: Sub-Programming. -* 11.1: Subprogram Types. -* 11.2: Independent vs Contained vs Nested Subprograms. -* 11.3: Alternate Entry Points. -* 11.4: Dynamic vs Static Subprograms. -* 11.5: Subprogram Execution Flow. -* 11.5.1: Subroutine Execution Flow. -* 11.5.2: User-Defined Function Execution Flow. -* 11.6: Sharing Data Between Calling and Called Programs. -* 11.6.1: Subprogram Arguments. -* 11.6.1.1: Calling Program Considerations. -* 11.6.1.2: Called Program Considerations. -* 11.6.2: GLOBAL Data Items. -* 11.6.3: EXTERNAL Data Items. -* 11.7: Recursive Subprograms. -* 11.8: Combining GnuCOBOL and C Programs. -* 11.8.1: GnuCOBOL Run-Time Library Requirements. -* 11.8.2: String Allocation Differences Between GnuCOBOL and C. -* 11.8.3: Matching C Data Types with GnuCOBOL USAGE's. -* 11.8.4: GnuCOBOL Main Programs CALLing C Subprograms. -* 11.8.5: C Main Programs Calling GnuCOBOL Subprograms. +* Sub-Programming. +* Subprogram Types. +* Independent vs Contained vs Nested Subprograms. +* Alternate Entry Points. +* Dynamic vs Static Subprograms. +* Subprogram Execution Flow. +* Subroutine Execution Flow. +* User-Defined Function Execution Flow. +* Sharing Data Between Calling and Called Programs. +* Subprogram Arguments. +* Calling Program Considerations. +* Called Program Considerations. +* GLOBAL Data Items. +* EXTERNAL Data Items. +* Recursive Subprograms. +* Combining GnuCOBOL and C Programs. +* GnuCOBOL Run-Time Library Requirements. +* String Allocation Differences Between GnuCOBOL and C. +* Matching C Data Types with GnuCOBOL USAGE's. +* GnuCOBOL Main Programs CALLing C Subprograms. +* C Main Programs Calling GnuCOBOL Subprograms. -* 12: Programming Style Suggestions. -* 12.1: Marking Changes in Programs. -* 12.2: Data Item Coding and Naming Conventions. -* 12.3: Table Subscripting versus Table Indexing. -* 12.4: Copybook Naming Conventions and Usage. -* 12.5: PROCEDURE DIVISION Sections Versus Paragraphs. -* 12.6: COMPUTE Versus ADD-SUBTRACT-MULTIPLY-DIVIDE. +* Programming Style Suggestions. +* Marking Changes in Programs. +* Data Item Coding and Naming Conventions. +* Table Subscripting versus Table Indexing. +* Copybook Naming Conventions and Usage. +* PROCEDURE DIVISION Sections Versus Paragraphs. +* COMPUTE Versus ADD-SUBTRACT-MULTIPLY-DIVIDE. -* 13: Programming for XFD. -* 13.1: GnuCobol use SQL for files. +* Programming for XFD. +* GnuCobol use SQL for files. -* A: Appendix A - Glossary of Terms. +* Appendix A - Glossary of Terms. -* B: Appendix B - Reserved Word List. +* Appendix B - Reserved Word List. -* C1: Appendix C1 - Grouped Word Lists by feature and function. -* C2: Appendix C2 - Intrinsic Functions. -* C3: Appendix C3 - System routines. -* C4: Appendix C4 - System names. -* C5: Appendix C5 - Exceptions. -* D: Appendix D - GNU Free Documentation License. -* E: Appendix E - Summary of Document Changes. +* Appendix C1 - Grouped Word Lists by feature and function. +* Appendix C2 - Intrinsic Functions. +* Appendix C3 - System routines. +* Appendix C4 - System names. +* Appendix C5 - Exceptions. +* Appendix D - GNU Free Documentation License. +* Appendix E - Summary of Document Changes. @comment* F4: Appendix F4 - Summary of Compiler Changes to v4 @comment* F3: Appendix F3 - Summary of Compiler Changes to v3.1.1 @comment* F2: Appendix F2 - Summary of Compiler Changes after GnuCOBOL Compiler v2.2. diff --git a/guide/gnucobqr.texi b/guide/gnucobqr.texi index eaabdfe..90e8c8b 100644 --- a/guide/gnucobqr.texi +++ b/guide/gnucobqr.texi @@ -88,14 +88,14 @@ This manual documents GnuCOBOL @value{VERSION} [@value{BUILD}]. It shows just th Most elements refer to current version @value{VERSION} [@value{BUILD}] and some to the one under development. @menu -* 1: CDF. -* 2: IDENTIFICATION DIVISION Syntax. -* 3: ENVIRONMENT DIVISION Syntax. -* 4: DATA DIVISION Syntax. -* 5: PROCEDURE DIVISION Syntax. -* 6: Intrinsic Functions Syntax. -* 7: Built-In Subroutines Syntax. -* 8: GNU Free Documentation License. +* CDF. +* IDENTIFICATION DIVISION Syntax. +* ENVIRONMENT DIVISION Syntax. +* DATA DIVISION Syntax. +* PROCEDURE DIVISION Syntax. +* Intrinsic Functions Syntax. +* Built-In Subroutines Syntax. +* GNU Free Documentation License. @end menu @end ifinfo @settitle GnuCOBOL Quick Reference @value{VERSION} [@value{BUILD}] @@ -106,7 +106,7 @@ Most elements refer to current version @value{VERSION} [@value{BUILD}] and some @comment ********************************************************************* @comment ** 1 CDF ** @comment ********************************************************************* -@newchapter{1,CDF} +@newchapter{CDF} When the compiler is operating in Fixed Format Mode, all CDF statements must begin in column eight (8) or beyond. There are two types of supported CDF statements in GnuCOBOL --- Text Manipulation Statements and Compiler Directives. @@ -148,13 +148,13 @@ Compiler directives are never terminated with a period. @comment ********************************************************************* @comment ** 2 IDENTIFICATION DIVISION Syntax ** @comment ********************************************************************* -@newchapter{2,IDENTIFICATION DIVISION Syntax} +@newchapter{IDENTIFICATION DIVISION Syntax} @diagram{IDENTIFICATION DIVISION, ID-Overview, ID-Overview, ID-Overview} @diagram{PROGRAM-ID Type Clause, ID-PROGRAM-ID-Type, ID-PROGRAM-ID-Type, None} @comment ********************************************************************* @comment ** 3 ENVIRONMENT DIVISION Syntax ** @comment ********************************************************************* -@newchapter{3,ENVIRONMENT DIVISION Syntax} +@newchapter{ENVIRONMENT DIVISION Syntax} @diagram{ENVIRONMENT DIVISION, ED-Overview, ED-Overview, None} @diagram{CONFIGURATION SECTION, ED-CONFIG-SECTION, ED-CONFIG-SECTION, None} @diagram{SOURCE-COMPUTER, ED-SOURCE-COMPUTER, ED-SOURCE-COMPUTER, None} @@ -184,7 +184,7 @@ Compiler directives are never terminated with a period. @comment ********************************************************************* @comment ** 4 DATA DIVISION Syntax ** @comment ********************************************************************* -@newchapter{4,DATA DIVISION Syntax} +@newchapter{DATA DIVISION Syntax} @diagram{DATA DIVISION, DD-Overview-Info, DD-Overview-TeX, None} @page @diagram{File/Sort-Description, DD-FD-SD, DD-FD-SD, DD-FD-SD} @@ -214,7 +214,7 @@ Compiler directives are never terminated with a period. @comment ********************************************************************* @comment ** 5 PROCEDURE DIVISION Syntax ** @comment ********************************************************************* -@newchapter{5,PROCEDURE DIVISION Syntax} +@newchapter{PROCEDURE DIVISION Syntax} @diagram{PROCEDURE DIVISION, PD-Overview-Info, PD-Overview-TeX, None} @diagram{PROCEDURE DIVISION Subprogram-Argument, PD-USING, PD-USING, None} @diagram{PROCEDURE DIVISION Main-Program-Argument, PD-CHAINING, PD-CHAINING, None} @@ -360,7 +360,7 @@ Compiler directives are never terminated with a period. @comment ********************************************************************* @comment ** 6 Intrinsic Functions Syntax ** @comment ********************************************************************* -@newchapter{6,Intrinsic Functions Syntax} +@newchapter{Intrinsic Functions Syntax} @diagram{ABS Function, FN-ABS, FN-ABS, None} @diagram{ACOS Function, FN-ACOS, FN-ACOS, None} @diagram{ANNUITY Function, FN-ANNUITY, FN-ANNUITY, None} @@ -487,7 +487,7 @@ Compiler directives are never terminated with a period. @comment ********************************************************************* @comment ** 7 Built-In Subroutines Syntax} ** @comment ********************************************************************* -@newchapter{7,Built-In Subroutines Syntax} +@newchapter{Built-In Subroutines Syntax} @diagram{C$CALLEDBY Built-In Subroutine, SS-C$CALLEDBY, SS-C$CALLEDBY, None} @diagram{C$CHDIR Built-In Subroutine, SS-C$CHDIR, SS-C$CHDIR, None} @diagram{C$COPY Built-In Subroutine, SS-C$COPY, SS-C$COPY, None} @@ -550,6 +550,6 @@ Compiler directives are never terminated with a period. @diagram{X"E5" Built-In Subroutine, SS-XE5, SS-XE5, None} @diagram{X"F4" Built-In Subroutine, SS-XF4, SS-XF4, None} @diagram{X"F5" Built-In Subroutine, SS-XF5, SS-XF5, None} -@newchapter{8,GNU Free Documentation License} +@newchapter{GNU Free Documentation License} @include fdl.texi @bye diff --git a/guide/gnucobsp.texi b/guide/gnucobsp.texi index 54a7232..45879eb 100644 --- a/guide/gnucobsp.texi +++ b/guide/gnucobsp.texi @@ -78,13 +78,13 @@ Permission is granted to copy and distribute translations of this manual into an @top GnuCOBOL Sample Programs This manual presents sample programs written for GnuCOBOL @value{VERSION} [@value{BUILD}]. @menu -* 1: FileStat-Msgs. (A FILE-STATUS values copybook) -* 2: COBDUMP. (An ASCII/Hex dump subroutine) -* 3: Colors. (Show all possible color/attribute combinations) -* 4: DAY-FROM-DATE. (Find day-of-week for any date) -* 5: GCic. (An interactive front-end to cobc) -* 6: STREAMIO. (Simplified stream I/O subroutine) -* 7: GNU Free Documentation License. +* FileStat-Msgs. (A FILE-STATUS values copybook) +* COBDUMP. (An ASCII/Hex dump subroutine) +* Colors. (Show all possible color/attribute combinations) +* DAY-FROM-DATE. (Find day-of-week for any date) +* GCic. (An interactive front-end to cobc) +* STREAMIO. (Simplified stream I/O subroutine) +* GNU Free Documentation License. @end menu @end ifinfo @settitle GnuCOBOL Sample Programs @value{VERSION} [@value{BUILD}] @@ -94,7 +94,7 @@ This manual presents sample programs written for GnuCOBOL @value{VERSION} [@valu @comment ********************************************************************* @comment ** 1. FileStat-Msgs ** @comment ********************************************************************* -@newchapter{1,FileStat-Msgs} +@newchapter{FileStat-Msgs} The FileStat-Msgs.cpy copybook contains an EVALUATE statement to translate the two-digit file status codes that may be generated by file I/O statements. The copybook assumes that the file status data item name is "STATUS" and the error message data item is named "MSG". By using the COPY statement's REPLACING clause, however, you may use the data names you wish, as follows: @@ -144,7 +144,7 @@ END-EVALUATE. @comment ********************************************************************* @comment ** 2. COBDUMP ** @comment ********************************************************************* -@newchapter{2,COBDUMP} +@newchapter{COBDUMP} COBDUMP is a useful little utility subroutine to produce a formatted hexadecimal and character dump of the data area passed to it. If you follow the GnuCOBOL forums, you've undoubtedly heard about the CBL_OC_DUMP subroutine that was the winning entry in a GnuCOBOL programming contest. It's a great tool for producing data dumps, and it's now included in the official GnuCOBOL distributions. @@ -178,7 +178,7 @@ The program source and cross-reference listing, produced using the GnuCOBOL Inte @comment ********************************************************************* @comment ** 3. Colors ** @comment ********************************************************************* -@newchapter{3,Colors} +@newchapter{Colors} Colors is a handy little GnuCOBOL utility program that will produce a screen showing all possible combinations of: @itemize @bullet @item @@ -208,7 +208,7 @@ The program source and cross-reference listing, produced using the cobxref, begi @comment ********************************************************************* @comment ** 4. DAY-FROM-DATE ** @comment ********************************************************************* -@newchapter{4,DAY-FROM-DATE} +@newchapter{DAY-FROM-DATE} DAY-FROM-DATE is a user-defined function that accepts a single numeric @code{USAGE DISPLAY} argument -- either a 7-digit Julian date in the form @i{yyyyddd} or an 8-digit Gregorian date in the form @i{yyyymmdd}. This argument may be supplied either as a PIC 9(n) USAGE DISPLAY data item (n=7 or 8) or as a 7- or 8-digit numeric literal. The subroutine will determine if the supplied date is a valid date in the year range 0000 through 9999 and what day of the week that date fell on. @@ -239,7 +239,7 @@ The program source and cross-reference listing, produced using the GnuCOBOL Inte @comment ********************************************************************* @comment ** 5. GCic ** @comment ********************************************************************* -@newchapter{5,GCic} +@newchapter{GCic} This is MUCH more than a mere demonstration program -- it's also a very practical utility! The "GCic" (GnuCOBOL Interactive Compiler) is a TUI (Textual User Interface) program that may be used as a full-screen interface to the "cobc" compiler. In addition, GCic can produce neat, concise and useful cross-reference listings of GnuCOBOL programs, showing not only where user-defined names and built-in registers and intrinsic functions are referenced, but also where user-defined data items ARE MODIFIED by program code! The program is well documented (IMHO) and you should find it fairly easy to follow. The GCic.cbl program was written to work with a native Windows or Windows/MinGW build of GnuCOBOL as well as a Windows/Cygwin, UNIX or OS X build. @@ -369,7 +369,7 @@ The program source and cross-reference listing, generated by cobxref, begins on @comment ********************************************************************* @comment ** 6. STREAMIO ** @comment ********************************************************************* -@newchapter{6,STREAMIO} +@newchapter{STREAMIO} STREAMIO is a utility I created to assist with handling stream I/O functions. I've used it to construct a number of useful little command-line utilities. Usage of this subroutine is completely documented in the program comments. The program COPY's a copybook named STREAMIOcb, the format of which is described in the program comments. @@ -442,6 +442,6 @@ The program source and cross-reference listing, produced using the GnuCOBOL Inte @page @include LISTING-STREAMIO.texi @page -@newchapter{7,GNU Free Documentation License} +@newchapter{GNU Free Documentation License} @include fdl.texi @bye diff --git a/guide/updates.texi b/guide/updates.texi index 0a2ab48..0209b91 100644 --- a/guide/updates.texi +++ b/guide/updates.texi @@ -1,7 +1,7 @@ @comment ********************************************************************* @comment ** E. Summary of Document Changes ** @comment ********************************************************************* -@newappendix{E,Summary of Document Changes} +@newappendix{Summary of Document Changes} GnuCOBOL is an ever-evolving tool. While all reasonable attempts will be made to maintain the currency of the information in this document, neither the author of this document nor the authors of the GnuCOBOL software extend any warranties of any kind for this document or for the information contained therein. 8th Edition on release of v3.2 with some updates for 4.0+.