Listing Options

By default, ACUCOBOL-GT does not generate a listing. The options described below cause a listing to be created and control its contents. In addition to the items specified for these options, the listing file contains all the options given to the compiler. For example, a listing file could begin with

iobench.cbl Sat Sep 18 06:55:54 2005 ACUCOBOL-GT v7.3.0 Page: 0001
..\bin\ccbl32 -Lfo @.lst iobench.cbl
CBLFLAGS: -v -Za

Note that CBLFLAGS (or any other variable) is not included in the listing unless it is set.

-La This option causes the compiler to create and display separate tallies for warnings and cautions. Without this switch, the compiler combines the tallies and reports the sum under the category of warnings.
-Lc     

This option creates a cross-reference table at the end of the listing. The cross-reference first lists all Working-Storage data items in alphabetical order, then all section names and paragraph names. Included for each item are: the line on which the item is declared, the name of the item, and the lines on which it is referenced. A small example is shown below.

CROSS-REFERENCE

Line   Name                    Referenced on line(s)

32     ACOMMA
30     DISPLAY-FILE-STATUS     54*    62
36     ERROR-WINDOW            59*    65*
26     FILE-STATUS             44     83
35     FLD1                    44*
34     FLD1-LITERAL            43
27     FULL-FILE-STATUS        53     54*
42     MAIN-SCREEN             Unreferenced
31     PRIMARY-FILE-STATUS     Owning group referenced
28     PRIMARY-FILE-STATUS     Owning group referenced
23     RST-REC                 Owning group referenced
33     SECONDARY-FILE-STATUS   Owning group referenced
29     SECONDARY-FILE-STATUS   Owning group referenced
21     TEST-RECORD75           77     79
37     WHITE-ON-BLUE           57

testit.cbl  Thu Sep 04 10:05:42 1998 ACUCOBOL-GT v4.0 Page:0002

CROSS-REFERENCE SECTIONS/PARAGRAPHS

Line   Name                    Referenced on line(s)

69     MAIN-LOGIC
51     TESTFIL-ERR-HANDLING
49     TESTFIL-ERROR-HANDLING  50

If an item is not referenced directly, the listing indicates if the item's owning group is referenced, or if a subordinate item is referenced, or both (owning group & subordinate item).

If the compiler detects that a Working Storage data item may be removed without affecting program functionality, it prints the word Unreferenced to the right of the name of the data item. This happens only if the data item is not a group item with subordinates that are referenced, and the data item is not subordinate to a group item that is referenced.

A line number followed by an asterisk (*) indicates that the contents of the data item were modified at that line. Parameters passed in a CALL statement BY REFERENCE are always marked as modified in the listing, because it is possible that they were changed. An item that is not directly referenced but belongs to a referenced group, or is subordinate to an item that is referenced, is so indicated. When a full listing is requested with a cross-reference (-Lfc), line numbers are placed in columns 3 through 9 of the listing.

The first three columns of the listing indicate the copy files. Each line of a copy file is indicated, with the nest level number followed by a greater than symbol (>). The nest level number is 1 for a copy file included directly in the main source file, 2 for a copy file that is included in a level 1 copy file, 3 for a copy file included in a level 2 copy file, and so on. An example of a copy file listing is shown under the -Lw option.

-Lf This options creates a full listing of the source program including the text of the COPY libraries.
-Li This option creates summary information about the program compiled. This is automatically set by any of the -L options.
-Ll      This option sets the page length of the listing. This option must be followed by the number of lines per page (as the next separate argument). Specifying a negative number or zero (0) for the argument produces a continuous listing without page headers or form feeds (a blank line separates different sections of the listing).
-Lo This option must be followed (as the next separate argument) by the name of the file to hold the listing. If this option is not specified, the listing is written to the standard output. This may be redirected to a file or a printer using the normal operating system commands. The acurfap syntax can be used to specify a file located on a system being served by AcuServer or AcuConnect. See Remote File Name Handling.
-Lp

This option directs the compiler to produce a preprocessed output file that can later be compiled to produce the same object code as the original source. The output includes the content of all COPY files and the results of all COPY REPLACING and REPLACE logic; the output does not include any comments or formatting from the original source. The output is sent to the standard output stream unless -Lo is used to specify a file. -Lp overrides all other listing options except -Lo.

This option is especially useful if your COPY files contain statements that other preprocessors don't allow in COPY files, such as embedded SQL or CICS statements. To compile such a program, you first create the preprocessed file and then compile it. For example:

ccbl -Lpo finalsrc.cbl -sp copybooks origsrc.cbl
   ccbl -Ga -o myprogram.acu finalsrc.cbl
Note: If the preprocessed code is subsequently compiled to include debugging symbols, the code displayed in the debugger is, of course, the preprocessed code, which does not include comments or formatting.
-Ls This option creates a symbol table at the end of the listing.
-Lw

This option specifies a wide listing format and implies a full listing (thus -Lw is equivalent to -Lfw). The listing uses 101 characters to display copy book indicators, line numbers, relative line numbers, program addresses, sequence numbers, and the rest of each source line.

For multiple-line sentences, the address of the first verb of each line is shown.

The first three columns indicate copy files. Each line of a copy file is indicated, with the nest level number followed by a greater than symbol (>). The nest level number is 1 for a copy file included directly in the main source file, 2 for a copy file that is included in a level 1 copy file, 3 for a copy file included in a level 2 copy file, and so on. Following is a portion of a listing that shows a copy file:

   50                main-logic. 
   51    000002         copy "copyfile".
1> 52               *
1> 53                   display "COPY file".
1> 54               *
   55    00000E         display window
   56                      size 40 lines 10
   57                      line 10 col 10 boxed
   58                      pop-up area is error-window.
-Lx This option creates extended statistics at the end of the listing.