Appendices



Contents:

List of Post-1968 Extensions
List of New Reserved Words
Summary of Formats
Glossary
Precompiler Messages


List of Post-1968 Extensions

This section lists the extensions to the ANSI 1968 COBOL report writer standard that are included in COBOL Report Writer.  The extensions are marked as follows:

ANS-68   features "held over" from the ANS-68 standard;

IBM   IBM's extensions to its ANS-68 implementation in OS/VS and DOS/VS COBOL ;

ANS-74   changes introduced in the ANSI 1974 standard;

ANS-85   changes introduced in the ANSI 1985 standard;

Codasyl   Codasyl extensions beyond the ANS-85 standard - potential features in a future ANS COBOL standard.

Unmarked extensions are those introduced by SPC Systems.  Not all the changes found in ANS-74 are listed here because the changes that represent restrictions to ANS-68 have not been implemented.  COBOL Report Writer is thus an optimal merging or best of all worlds from the three standards.

Items marked    §      are recent additions, new to this release.

  FILE-CONTROL and FILE SECTION

 ¶   MODE clause to enable processing by an Independent Report File Handler.
 ¶   PAGE BUFFER clause to allow each page to be held in memory in order to set up an irregular format.
 §   RANDOM PAGE clause to allow the page's current line and column to be repositioned like a "cursor".
 ¶   DUPLICATED clause to reduce coding when program has more than one report with a similar layout.
 ¶   (ANS-68) Report file FD may be followed by a record description and may be written to independently.
 ¶   (ANS-85) FD for report file may have a GLOBAL clause and/or an EXTERNAL clause.
 ¶   FIRST PAGE NO ADVANCING clause, preventing initial page advance.
 §   STYLE clause to facilitate special effects in output device.
 §   REPORTS ARE ALL option to assign all reports to a single file.
 §    (IBM) A report may be written to up to two files simultaneously.

  PAGE LIMIT Clause

 ¶   PAGE LIMIT phrases become clauses in their own right and PAGE LIMIT may be last.
 ¶   DETAIL in FIRST / LAST DETAIL may be abbreviated as DE.
 ¶   FIRST BODY GROUP alternative spelling for FIRST DETAIL.
 ¶   LAST DE OR CH / DETAIL OR CONTROL HEADING alternative spellings for LAST DETAIL.
 ¶   LAST CF / CONTROL FOOTING / BODY GROUP alternative spellings for FOOTING.
 ¶   FIRST DETAIL defaults to line following PAGE HEADING.
 ¶   LAST DETAIL defaults to line preceding PAGE FOOTING.
 ¶   +/PLUS form of FOOTING.
 ¶   FOOTING defaults to line before PAGE FOOTING group, or to PAGE LIMIT.
 ¶   Identifier operand of LAST DETAIL.
 ¶   (ANS-74) Word LINE or LINES not required.

  Rest of RD

 ¶   REPORT as an alternative word for FINAL.
 ¶   LINE LIMIT clause.
 ¶   OVERFLOW clause to check arithmetic expressions for size error.
 ¶   SUM OVERFLOW clause to check totals for size error.
 ¶   ALLOW (NO) SOURCE SUM CORR clause to enable/disable SOURCE SUM correlation.
 ¶   (IBM) CONTROL operand FINAL is assumed if not declared.
 ¶   (IBM) Optional WITH before CODE.
 ¶   (ANS-68) SUMming of non-REPORT SECTION item takes place when DETAIL is generated that has same item as a SOURCE (SOURCE SUM correlation ).
 ¶   (ANS-68) Control data-names may be subscripted.
 ¶   (ANS-68) Control fields may be referenced in any group and, at CONTROL FOOTING time, pre-break values are supplied.
 ¶   (ANS-74) Literal form of CODE clause.
 ¶   (Codasyl) Optional word IS with CODE.
 ¶   (Codasyl) CODE may be of any length.
 ¶   (Codasyl) Identifier form of CODE clause.
 ¶   (ANS-85) GLOBAL clause, enabling the report, or its groups, to be accessed from within a contained program.
 §   STYLE clause to facilitate special effects in output device.

  Report Groups (General)

 ¶   PLUS may be written as + whenever used.
 ¶   Report Groups may have any number of group or elementary levels.
 ¶   (ANS-68) Report group may consist of elementary 01-level entry only.
 ¶   (ANS-74) The default qualifier for PAGE-COUNTER and LINE-COUNTER in the REPORT SECTION is the current report.
 ¶   The default qualifier for PAGE-COUNTER and LINE-COUNTER in a USE BEFORE REPORTING section is the report containing the group referred to.

  TYPE Clause

 ¶   Word TYPE optional.
 ¶   TYPE DETAIL assumed if no TYPE clause.
 ¶   Control-name need not follow CH if only one control present, or CF.
 ¶   OR PAGE option of CONTROL HEADING for outputting group after page advance even if no control break.
 ¶   (Codasyl ("ON")) Optional word FOR or ON after CH and CF.
 §   CF may be used for more than one level.
 §   CF FOR ALL, meaning CF for all levels of control.

  LINE Clause

 ¶   LINE alone means LINE + 1.
 ¶   Absolute LINE may follow relative LINE provided first LINE is absolute.
 ¶   NEXT PAGE phrase allowed on LINEs other than first in RH and RF groups.
 ¶   LINE may have no subordinate COLUMNS, thus producing blank line.
 ¶   Multiple form to allow several lines to be defined in one entry.
 ¶   (ANS-68) LINE may be coded as though subordinate to another LINE (although a Warning is issued).
 ¶   (ANS-68) Relative LINE allowed at start of PAGE FOOTING.
 ¶   (ANS-74) LINE integer ON NEXT PAGE option.
 ¶   (ANS-74) LINE NEXT PAGE not allowed in types PH, or PF.  (OS/VS and DOS/VS COBOL do not diagnose this but the code fails as a consequence.)
 §   (IBM) Same absolute LINE number may be repeated with each COLUMN.

  COLUMN Clause

 ¶   COLUMN may be shortened to COL.
 ¶   COLUMN alone means COLUMN + 1.
 ¶   COLUMN + 1 assumed by default for any elementary item beneath LINE level with no name, if NOOSVS in effect.
 ¶   RIGHT, CENTER, and LEFT phrases.
 ¶   Multiple form to allow several items to be defined in one entry.
 ¶   (ANS-68) COLUMN may be coded at same level as preceding LINE (although a Warning is issued).
 ¶   (Codasyl) Relative form (+ or PLUS).

  SOURCE Clause

 ¶   SOURCE keyword optional.
 ¶   Arithmetic expression form.
 ¶   Multiple form to allow several items to be defined in one entry.
 ¶   (ANS-68) CURRENT-DATE and TIME-OF-DAY may be used as identifiers.
 ¶   (ANS-85) identifier may be reference modified.

  VALUE Clause

 ¶   VALUE keyword optional.
 ¶   PICTURE clause optional with non-numeric literals.
 ¶   Multiple form to allow several items to be defined in one entry.

 SUM Clause

 ¶   Optional word OF after SUM.
 ¶   Cross-foot and roll-forward SUM of SOURCE and VALUE entries allowed.
 ¶   Totalling of values in printed tables, along any axis.
 ¶   SUM allowed in any TYPE of group.
 ¶   SUM may be used as term in expression.
 ¶   Arithmetic expression allowed as operand.
 ¶   Multiple form to total another multiple entry.
 ¶   (ANS-68 not in OS/VS or DOS/VS COBOL) UPON may refer to DETAIL in another report.
 ¶   (ANS-68 allowed but not implemented by OS/VS or DOS/VS COBOL) SUM may refer to REPORT SECTION data-name in a different report .
 ¶   (ANS-74) More than one SUM clause may be coded in the same entry.
 ¶   (ANS-74) If SOURCE SUM correlation not in effect, SUM adds all operands on each GENERATE.
 §   (IBM) Data-name of SUM entry may be re-used in different reports and is implicitly qualified by report-name.

 PICTURE Clause

 ¶   "<" (left-shift) symbol for variable-length fields.
 §   ">" symbol as optional terminator for variable-length part.
 §   General insertion characters using quotes in picture-string.  (This was long since considered by Codasyl and discarded.)
 §   (IBM) PICTURE symbol A may be used even with non-alphabetic literal.

 NEXT GROUP Clause

 ¶   NEXT BODY GROUP / NEXT DE OR CH GROUP/ NEXT DETAIL OR CONTROL HEADING GROUP as alternative spellings.
 ¶   (Codasyl) Optional word ON before NEXT PAGE.

 New Clauses

 ¶   PRESENT / ABSENT [JUST] AFTER PAGE / control / PAGE OR control as more general alternative to GROUP INDICATE.
 ¶   Multiple-choice [PRESENT] WHEN entry to select one from a set of SOURCE / VALUE terms.
 §   Special condition CONTROL IS control-id for use with PRESENT WHEN and multiple CF group.
 ¶   OCCURS for repetition and optional DEPENDING ON... and STEP phrases.
 ¶   VARYING clause to enable data-names to vary over a range of values during processing of a repeating item.
 ¶   REPEATED clause for side-by-side presentation of body groups.
 ¶   GROUP LIMIT clause to give lower limit to body groups.
 ¶   ROUNDED phrase for SUM / SOURCE entries.
 ¶   FUNCTION clause for invocation of built-in or user-written routine for special-format displays.
 §   New FUNCTIONs CTIME, MONTH, MOVE, YDATE, RYDATE, STATE, STATEF, ZIP.
 ¶   COUNT clause, similar to SUM but adding 1 per occurrence.
 ¶   (partly Codasyl) PRESENT / ABSENT WHEN clause to select / deselect any items, lines or groups.
 §   MULTIPLE PAGE clause for spreading a group over several pages.
 §   WRAP clause for automatic continuation on a new line.
 §   STYLE clause to facilitate special effects in output device.

 PROCEDURE DIVISION

 ¶   SET PAGE TO HOLD/RELEASE statement to invoke / release Page Buffer.
 ¶   SET LINE and SET COLUMN statements to move vertically and horizontally within the Page Buffer or Random Page.
 ¶   (IBM) A Declarative procedure may refer to (for example PERFORM) a non-Declarative procedure.
 ¶   Adding to LINE-COUNTER creates an additional gap of that size.
 ¶   A REPORT SECTION data-name may be the target field of a PROCEDURE DIVISION statement.
 ¶   (IBM) MOVE 1 TO PRINT-SWITCH.
 ¶   (ANS-74) SUPPRESS PRINTING statement, equivalent to MOVE 1 TO PRINT-SWITCH.
 ¶   (ANS-85) USE GLOBAL BEFORE REPORTING form of directive.
 §   (Codasyl) INITIATE UPON file-name.

 Other Features

 ¶   Independent Report File Handlers, built-in or user-written, for directing report writer output to a special device or to user's own de-spooling software.
 §   Report writer keywords are only locally reserved.
 ¶   SIGN, BLANK WHEN ZERO, and JUSTIFIED allowed at group level.
 §   New form of SIGN clause for user-defined treatment of negatives.
 ¶   (ANS-68) With summary reporting, any number of DETAIL groups may be present.
 ¶   (ANS-85) REPORT SECTION and report writer statements may be used in nested programs.
 ¶   (ANS-85) Lower-case valid in all report writer formats.
 ¶   (ANS-85) New features incidentally affecting report writer, such as:
      reference modification, ">=" and "<=" operators, subscripting to 7 levels, relative subscripting.
 ¶   (ANS-85) REPLACE statement may affect report writer code.
 §   Hexadecimal Literals in REPORT SECTION.
 ¶   Symbolic Characters in REPORT SECTION.
 §   Double Byte Character Set (USAGE DISPLAY-1) in REPORT SECTION.
 §   Report writer data-names may be DBCS.
 §   Fips Flagging capability.
 §   Ability to choose only ANS standard report writer subset.

 General COBOL Features

A number of additional features provided by the precompiler apply to any part of the COBOL source, rather than just to COBOL Report Writer.  They are therefore listed here in some detail:

In-line Comments

   The two-character combination "*>" indicates that the rest of the source line is to be treated as a comment, for example:

 
           05  WS-EOF        PIC 9.      *> end-of-file indicator
           ...
           MOVE 1 TO WS-EOF              *> set end-of-file indicator

Wild Cards in COPY

   The two-character combination "??" may be coded (within pseudotext brackets ==...==) as part of the text to be replaced in a COPY...REPLACING or REPLACE statement.  It causes a successful match with any COBOL word, or a (non-null) part of a word if coded as such.  The "??" pair may also appear in the replacement text, in which case it copies unchanged the fragment of text that was matched with the corresponding "??" in the text being replaced.

   This sample replaces a certain parameter in each CALL:

 
        REPLACE ==CALL ?? USING W-PARAM-1== BY ==CALL ?? USING W-PARAM-2==.

   This sample changes all words in the source library member beginning with IN- to begin instead with OUT-:

        COPY MEMBER1 REPLACING ==IN-??== BY ==OUT-??==.

 Precompiler's Tolerance of Other COBOL Constructs

When using the precompiler in tandem with other precompilers or preprocessors, it is essential to know how the precompiler will react to non-ANS COBOL features in the COBOL source.  The precompiler has been designed in general to accept embedded CICS, IMS and DB2 commands and tolerate other alien extensions that might reasonably be expected.  In particular, it will accept:

The EXEC ... END-EXEC construct.  The text from EXEC through END-EXEC is copied intact, enabling CICS and database commands to be embedded in a COBOL Report Writer source.

Unrecognized DATA DIVISION SECTIONs.  Any such SECTION is transcribed intact.

Non-standard characters in the continuation column.  Any character other than "D", "-", "*", "/", and space in column 7 is treated as though it were a "*" (comment) character.  Such lines will be copied intact unless they immediately precede a report writer construct such as REPORT SECTION that would be removed by the precompiler.

Unrecognized PROCEDURE DIVISION statements.  Any unrecognized word found in the PROCEDURE DIVISION will be copied intact unless it immediately follows one of the report writer commands such as INITIATE, when it is expected to be the (first) operand of the statement.



List of New Reserved Words


The following list shows the new reserved words used in the COBOL Report Writer syntax.  Except for SUPPRESS PRINTING which is in the 1974 and 1985 ANS standards, these words are new to all three standards.  However, with the exception of DATA-SUB-1/2/3/4, LINE-LIMIT, REPORT-NUMBER, and REPEATED-COUNTER they are locally reserved only when the OSVS option is in effect.  This means in general that the user may use these names as data-names, file names, etc. provided that, if they are used in the REPORT SECTION, it is only with care to avoid ambiguity.  For example, SOURCE IS COLS and SOURCE IS STEP are permitted, but the multiple form SOURCES ARE STEP, COLS would not be correctly parsed.  SOURCE IS BUFFER, DUPLICATED would be permitted as these keywords normally appear only in the SELECT clause.

Keyword   (References)

ABSENT   (see PRESENT/ABSENT AFTER Clause, PRESENT/ABSENT WHEN Clause)
BATCH   (see MODE Clause)
BODY   (see PAGE Clause, NEXT GROUP Clause)
BUFFER   (see PAGE BUFFER Clause)
CENTER, CENTRE   (see COLUMN clause)
CODE-VALUE   (see CODE Clause)
COL   (see COLUMN Clause)
COLS   (see COLUMN Clause)
COLUMNS   (see COLUMN Clause)
DATA-SUB-1/2/3/4   OCCURS clause
DEFAULT   PRESENT / ABSENT WHEN clause
DEPTH   (see OCCURS Clause)
DUPLICATED   (see DUPLICATED Clause)
FUNC   (see FUNCTION Clause)
FUNCTION   FUNCTION clause
HOLD   (see SET Statement)
LINE-LIMIT   (see LINE LIMIT Clause)
NEW   (see PRESENT AFTER Clause)
NONE   (see SOURCE Clause)
NUMBERS   (see COLUMN Clause and LINE Clause)
PRESENT   (see PRESENT AFTER Clause and PRESENT WHEN Clause)
PRINTING   (see SUPPRESS PRINTING Statement)
REPEATED   (see REPEATED Clause)
REPEATED-COUNTER   (see REPEATED Clause)
REPLACE   (see OVERFLOW Clause)
REPORT-NUMBER   (see DUPLICATED Clause)
SOURCES   (see SOURCE Clause)
STEP   (see OCCURS Clause)
SUPPRESS   (see SUPPRESS PRINTING Statement)
UNLESS   (see PRESENT WHEN Clause)
WIDTH   (see OCCURS Clause and REPEATED Clause)
WRAP   (see WRAP Clause)

Words beginning with the prefix R - - (note the double hyphen) must also be avoided because the precompiler uses this prefix for its own generated data and procedure names.

Summary of Formats

   a.  SELECT...ASSIGN clauses

   Format

 >>--SELECT-+----------+-file-name-->
            +-OPTIONAL-+

              +-------------+
              v             |
 >--ASSIGN TO assignment-name--+---------------------------+->
                               +- RESERVE integer-+-------+-+
                                                 +-AREA--+
                                                 +-AREAS-+
 >--+-----------------------------------------------+->
    +-MODE IS-+-BATCH-----------------------------+-+
              +-mnemonic-name-+-----------------+-+
                              |       +-------+ |
                              |       v       | |
                              +- USING parameter-+

 >-+----------------------------+--+------------------+->
   +-DUPLICATED integer-2 TIMES-+  +-WITH PAGE BUFFER-+
                                   +- WITH RANDOM PAGE-+

 >-+-------------------------------------+-------------->
   +-TYPE IS-+-DEFERRED----------------+-+
             +-NONE--------------------+
             +-device-name-+----------++
                           +-DEFERRED-+

 >-+---------------------------++------------------------+-. --><
   +-FIRST PAGE+-NO-+ADVANCING-++-other standard clauses-+
               +WITH+

   b.  FILE SECTION Entries

   Format

 >>--FD file-name-+-------------+-+-----------+-->
                  +-IS EXTERNAL-+ +-IS GLOBAL-+
                    +---------+
                    v         |
 >-+-REPORT IS---++-report-name-+->
   +-REPORTS ARE-++-ALL---------+

   Format (continued)

 >-+-------------------------+->
   |            +---------+  |
   |            v         |  |
   +-STYLE IS-+-style-name-+-+
              +---NORMAL---+
 >-+-----------------------+-+------------------------+->
   +-BLOCK CONTAINS clause-+ +-RECORD CONTAINS clause-+

 >-+------------------------+-+------------------------+--. -->
   +-RECORDING MODE IS mode-+ +-other standard clauses-+

 >-+--------------------------+--><
   | +----------------------+ |
   | v                      | |
   +-record-description-entry-+

   c.  REPORT SECTION Entries

   Format
                        +----------------+
                        v                |
 >>--REPORT SECTION. ---report-description---><

  where report-description is defined as:

   Format

 >>--RD report-name-+---------+-+-----------------------------+->
                    +IS GLOBAL+ +LINE LIMIT IS-+-integer----+-+
                                               +-identifier-+
 >-+--------------------+-+----------------------------------+->
   +HEADING IS integer--+ +FIRST-+-DETAIL-----+-IS integer---+
                                 +- DE---------+
                                 +- BODY GROUP-+
 >--+---------------------------------------------------------+->
    +LAST+-DETAIL++---------------------+-IS-+-integer------+-+
         +-DE----++OR+-CONTROL HEADING-++    +-identifier---+
                     +-CH--------------+
 >--+------------------------------------------------------+->
    +-LAST-+-CONTROL FOOTING-+-+-IS-+-integer------------+-+
    |      +-CF--------------+ |    +-+-PLUS-+-integer---+
    |      +-BODY GROUP------+ |      +- + --+
    +-FOOTING------------------+
 >-+--------------------------------------+-->
   +-PAGE-+------------+-integer-+-------++
          +-LIMIT IS---+         +-LINE--+
          +-LIMITS ARE-+         +-LINES-+

   Format (continued)

 >-+--------------------------------------------+->
   +-+-CONTROL IS---+-+--------+-+------------+-+
     +-CONTROLS ARE-+ +-REPORT-+ | +--------+ |
                      +-FINAL--+ | v        | |
                                 +-control-id-+
 >-+----------------------------++----------------------------+->
   ++CODE IS--++-literal------+-++-ALLOW-+--+-SOURCE SUM CORR-+
    +WITH CODE++-mnemonic-name+          +NO+
               +-identifier---+
                  +--------+
                  v        |
 >---STYLE IS--+--style-name--+->
               +----NORMAL----+
 >-+------------------------------------------------+->
   +-OVERFLOW PROCEDURE IS-+-OMITTED--------------+-+
                           +-STANDARD-------------+
                           +-REPLACE BY literal---+
                           +-STOP literal---------+
 >-+-----------------------------------------------------+-. ->
   +--SUM OVERFLOW PROCEDURE IS-+-OMITTED--------------+-+
                                +- STANDARD-------------+
    +----------------+          +-REPLACE BY literal---+
    v                |          +-STOP literal---------+
 >--report-group-entry--><

   d.  Report-Group-Entry

   Format

 >>--level-number-+-----------+->
                  +-data-name-+
 >-+----------------------------------------------------------+->
   +-------+++-REPORT HEADING-+-------------------------------+
   +TYPE IS+|+-RH-------------+                               |
            ++-PAGE HEADING-+---------------------------------+
            |+-PH-----------+                                 |
            ++-CONTROL HEADING-++----------------------------++
            |+-CH--------------+++-ON-+control-id-+---------++|
            |                    +-FOR+           +-OR PAGE-+ |
            ++-DETAIL-+---------------------------------------+
            |+-DE-----+                                       |
            ++-CONTROL FOOTING-+-+-----------------------+----+
            |+-CF--------------+ |          +--------+   |    |
            |                    |          v        |   |    |
            |                    +-+-ON-+-+-control-id-+-+    |
            |                      +-FOR+ +-ALL--------+      |
            ++-PAGE FOOTING-+---------------------------------+
            |+-PF-----------+                                 |
            ++-REPORT FOOTING-+-------------------------------+
             +-RF-------------+

   Format (continued)

 >-+------------------------------------------------------>  1
   +-NEXT-+-BODY------------------------------+-GROUP IS-->  2
          +-+-DETAIL-+-OR-+-CONTROL HEADING-+-+
            +-DE-----+    +-CH--------------+

 1  >-------------------------+->
 2  >--+-+-PLUS-+-integer---+-+
       | +- + --+           |
       +--integer-----------+
       +-ON NEXT PAGE-------+

 >-+------------------------+--->
   +-GROUP LIMIT IS integer-+

 >-+---------------------------------------------------------+->
   +-REPEATED-+-integer-TIMES-+-----------------------------++
              |               ++-EVERY -+-integer-+-COLUMNS-++
              |                +-WIDTH -+         +-COLS----+|
              ++--------------++-EVERY-+-integer-+-COLUMNS-++
               +integer TIMES-++-WIDTH-+         +-COLS----+
 >-+----------------------------------------------------------+->
   |                     +-----------------+                  |
   |                     v                 |                  |
   ++-LINE-+NUMBER IS--+++-+PLUS-+-integer-+-+--------------+-+
    |      +NUMBERS ARE+|| +- + -+         | +-ON NEXT PAGE-+
    +-LINES ARE---------++-integer---------+
 >-+----------------------------------------------------------+->
   |                                    +------------------+  |
   |                                    v                  |  |
   +++COLUMN++NUMBER-+++--------++-IS--++-+-PLUS-+-integer-+--+
    |+COL---++NUMBERS+|+-LEFT---++-ARE-+| +- + --+         |
    +-COLUMNS---------++-CENTER-+       +--integer---------+
    +-COLS------------++-CENTRE-+
                       +-RIGHT--+
 >-+---------------------------------+->
   +-+-PICTURE-+-IS character-string-+
     +-PIC-----+
 >-+--------------------------------------------+->
   |                 +------------+             |
   |                 v            |             |
   +-+-------------+-+-identifier-+-+---------+-+
     +-SOURCE IS---+ +-expression-+ +-ROUNDED-+
     +-SOURCES ARE-+
 >-+------------------------+--->
   |                +-----+ |
   |                v     | |
   +-+------------+-literal-+
     +-VALUE IS---+
     +-VALUES ARE-+

   Format (continued)
 >-+-------------------------------------------------+->
   +-+-FUNCTION-+-IS function-name-+---------------+-+
     +-FUNC-----+                  |   +-------+   |
                                   |   v       |   |
                                   +-( parameter )-+
 >-+-------------------------------------------------------->  1
   | +----------------------------------------------------+
   | |         +----------------------------------------+ |
   | v         v                                        | |
   +-+--SUM OF-+-report-section-data-name-------------+-+--->  2
     |         +-+-identifier-+-+-------------------+-+ |
     |           +-expression-+ |      +--------+   |   |
     |                          |      v        |   |   |
     |                          +- UPON group-name---+   |
     |           +----------------------+               |
     |           v                      |               |
     +--COUNT OF report-section-data-name---------------+

 1  >-------------------------------------+-->
 2  >-+---------------------+-+---------+-+
      +-RESET ON control-id-+ +-ROUNDED-+

 >-+-----------------------------------------------+->
   +-+-PRESENT-+-+-WHEN---+-condition--------------+
   | +-ABSENT--+ +-UNLESS-+                        |
   +-+-PRESENT-+-AFTER NEW--+-control-id OR PAGE-+-+
   | +-ABSENT--+            +-PAGE OR control-id-+ |
   |                        +-PAGE---------------+ |
   |                        +-control-id---------+ |
   +--PRESENT JUST AFTER NEW PAGE------------------+
   +--GROUP INDICATE-------------------------------+
   +--multiple-choice-form - see below-------------+

 >-+--------------------------------------------------+->
   +-+----------+-+-LEADING--+-+--------------------+-+
     +--SIGN IS-+ +-TRAILING-+ +-SEPARATE CHARACTER-+
 >--+-----------------+-+---------------+-+-------------------+->
    +-BLANK WHEN ZERO-+ +-USAGE DISPLAY-+ +-JUSTIFIED-+-RIGHT-+
                                           +-JUST------+
 >-+-------------------------------------->  1
   +-OCCURS-+------------+-integer-TIMES-->  2
            +-integer TO-+
 1  >---------------------------------+->
 2  >-+-----------------------------+-+
      +-DEPENDING ON-+-identifier-+-+
                     +-expression-+
 >--+---------------------------------+->
    +-+-STEP--+-integer---+---------+-+
      +-WIDTH-+           +-LINES---+
      +-DEPTH-+           +-COLUMNS-+
                          +-COLS----+

   Format (continued)
 >-+--------------------------------------------------------+->
   |         +--------------------------------------------+ |
   |         v                                            | |
   +-VARYING-data-name-+-----------------++---------------+-+
                       +-FROM expression-++-BY expression-+
 >-+----------------------+->
   +-+----+-MULTIPLE PAGE-+
     +-NO-+
 >-+----------------+--------------------------------->  1
   +-WITH-+-NO WRAP-+
          +-WRAP--+---------------------------------+->  2
                  +-AFTER-+-COLUMN-+-+-integer----+-+
                          +-COL----+ +-identifier-+
 1  >------------------------------------------------------+->
 2  >-+---------------------------+-+--------------------+-+
      +-TO-+-COLUMN-+-+integer---++ +-STEP integer LINES-+
           +-COL----+ +identifier+
 >-+----------------------------------------------+-. --><
   |             +--------+                       |
   |             v        |                       |
   +--STYLE IS-+-style-name--+----------------+-+-+
               |             +-WHEN condition-+ |
               +---NORMAL-----------------------+

   e.  Multiple-choice Form

   Format
   +----------------------------------------------------- ---+
   |               +------------+                           |
   v               v            |                           |
>>-++-------------++-identifier-+-+-PRESENT WHEN-+          +--->>
   |+-SOURCE IS---++-expression-+ | +------------+          |
   |+-SOURCES ARE-+       +-----+ | +--condition------------+
   |                      v     | | +-CONTROL IS control-id-+
   +--------+------------+literal-+ +----OTHER--------------+
   |        +-VALUE IS---+        |
   |        +-VALUES ARE-+        +--------+
   ++FUNCTION+IS function-name+-----------++
    +FUNC----+                | +-------+ |
                              | v       | |
                              +(parameter)+

   f.  Additional PROCEDURE DIVISION Statements

   Format

 >>--USE-+--------+-BEFORE REPORTING report-group-name. -->>
         +-GLOBAL-+

   Format

 >>-+-SUPPRESS PRINTING------------+-><
    +-MOVE integer TO PRINT-SWITCH-+

   Format

 >>--GENERATE-+-detail-group-name-+-><
              +-report-name-------+

   Format
               +---------+
               v         |
 >>--INITIATE--report-name--><

   Format
                +---------+
                v         |
 >>--TERMINATE--report-name--><

   Format

 >>-SET PAGE STATUS-+--------------------+-TO-+-HOLD----+-><
                    +-+-IN-+-report-name-+    +-RELEASE -+
                      +-OF-+

   Format

 >>-SET LINE-+-------------------++-TO-+-integer---------+----+><
             ++-IN-+-report-name-+|    +-identifier------+    |
              +-OF-+              |    +-FIRST-+-DETAIL-++    |
                                  |            +-DE-----+     |
                                  +-+- UP---+-BY-+-integer----++
                                    +- DOWN-+    +-identifier-+

   Format

 >>-SET-+COLUMN++-----------------++TO----------++-integer---+-><
        +COL---+++IN+-report-name-+++-LEFT-+-BY-++-identifier+
                 +OF+               +-RIGHT+




Glossary


Absolute Positioning
This describes a LINE or COLUMN clause with an integer operand not preceded by + or PLUS.  Absolute positioning places the line or field at a fixed vertical or horizontal position relative to the edge of the page.

Axes of Summing
Four axes are possible: group of LINEs, LINE, group of COLUMNs, and COLUMN.  When a field is the SUM of another REPORT SECTION field that repeats (has an OCCURS, or multiple LINES or COLUMNS), totalling may take place along any or all of these axes, depending on whether or not the SUM also repeats along the axes.

Body Group
A CONTROL HEADING, DETAIL, or CONTROL FOOTING report group.  They are so named because they appear in the "body" of the page, that is, between any PAGE HEADING and PAGE FOOTING groups that may also be present.

CODE
A value that is passed to the output routine but does not ultimately appear in the report.  It was originally meant for separating several reports written to the same spool file, but may now also be used for any control information for a basic file that is to be processed by special software downstream, or one controlled by an Independent Report File Handler.

Conditional Field
A field that is qualified by a PRESENT/ABSENT WHEN/AFTER clause or an OCCURS ... DEPENDING with minimum zero, and may not therefore always appear in the report.

Control
A field (control field) represented by an identifier (control identifier), defined in a SECTION other than the REPORT SECTION, whose value is tested by report writer on each GENERATE to establish whether there has been a change in value since the previous GENERATE for the report.

Control Break
A change in the value of a control from one GENERATE to the next.  Control breaks may occur at one of several levels, depending on how many controls are listed in the CONTROL clause, and their hierarchy, that is, the major-to-minor order in which they are listed, which is also the order of testing.

Control Characters
Characters which do not appear in the output as printed data but instead influence the way the data is presented.  They are often referred to as escape sequences since Escape is frequently the first character.

Cross-footing
Summing from a REPORT SECTION field into another field in the same group.

Declarative SECTION
A SECTION, preceded by a USE [GLOBAL] BEFORE REPORTING statement, that will be executed implicitly just before a certain report group is produced.

Dummy Report Group
A report group that is used not for producing output, but for triggering particular features, such as a NEXT GROUP clause or a Declarative SECTION.  It usually has no LINE clauses (and hence no COLUMN clauses either).

DUPLICATED file
A file that has a DUPLICATED clause.  This defines a number of separate copies of all the report's control registers and enables several different physical reports to be produced from one Report Description.

Entry
An element of the DATA DIVISION of a source program beginning with a level-number (or a level-indicator like RD, FD, etc.), followed by optional clauses, and ending in a period.

File Handler
Short for Independent Report File Handler (see below).

FINAL control
An object of the CONTROL and TYPE clauses and the RESET phrase that describes the top-level control, which may be used to produce a CONTROL FOOTING that encompasses the whole report, such as for grand totals.  It may also produce a major report-encompassing CONTROL HEADING.  The alternative (preferred) name is REPORT.

Form Feed
This is used in this publication to denote the physical action when a printer skips forward to the top of a new page.  On a line printer this used to be referred to as a "skip to channel 1".  A form feed is used in "batch" printing to execute a page advance but an Independent Report File Handler may use a different method.

Function
A built-in or user-written subroutine that is automatically invoked when the programmer uses a FUNCTION clause.  Functions may produce any special format defined by the user or supplied as standard.

GLOBAL Report
A report defined with a GLOBAL phrase in the RD.  Such a report is available, together with its special registers and sum-counters, to any program nested within the one in which the RD is defined.

GROUP INDICATE
An older term, used in current ANS standards, for the simplest type of PRESENT AFTER clause.

Independent Report File Handler
A supplied or user-written subroutine that intercepts all the output from the report before it is written and handles it in its own way.  It is invoked automatically when the user codes a MODE sub-clause in the SELECT...ASSIGN.

Multiple CONTROL FOOTING
A group headed by the clause TYPE CF FOR control-1 control-2... or CF FOR ALL.  The group is then used as a CONTROL FOOTING for each (or ALL) of the controls, thus avoiding the need to code a similar report group at several levels.

Multiple Form of Clauses
A LINE, COLUMN, SOURCE, or VALUE clause with several operands.  This enables several different LINEs or COLUMN fields to be represented in a single entry.  Such a single entry may also be referred to in a single SUM clause with a great saving in program code.

Multiple-choice Entry
A series of SOURCE, VALUE, or FUNCTION clauses, each followed by a [PRESENT] WHEN / AFTER clause, all written in the same elementary entry.  The first choice that is "present" becomes the effective value.  WHEN OTHER may be used for the "catchall".

Non-REPORT SECTION SUM
A SUM clause referring to an identifier that is not defined in the REPORT SECTION.  Adding takes place according to SOURCE SUM correlation or on execution of each GENERATE.

Page Advance
This is an automatic operation that takes place when a body group that is about to be printed cannot fit entirely on the current page.  It outputs a PAGE FOOTING group (if defined), increments PAGE-COUNTER, advances to the top of a new page, and outputs a PAGE HEADING group (if defined).

Page Buffer
An area defined when a file is defined with a MODE clause and a WITH PAGE BUFFER clause.  The Page Buffer enables report data to be displayed on the page in random order, using the SET PAGE STATUS, SET LINE, and SET COLUMN statements.

Page-fit Test
A test performed automatically to ensure that the whole of a body group can be fitted on the current page.  If not, a page advance is executed and the whole of the body group appears on the next page.

Precompiler
The translation phase of the COBOL Report Writer software that converts report writer clauses and statements into procedural ("vanilla") COBOL before they are compiled.

Relative Positioning
This applies to a LINE or COLUMN clause with a + or PLUS before the integer.  (LINE and COLUMN with no operand imply + 1 and are therefore also relative.)  Relative positioning places the line or field at a distance relative to the preceding line or field.

Report
A report is any human-readable set of data lines produced by any program.

Report Description
The RD entry for a report, plus all the Report Group Descriptions that follow the RD.

Report Description Entry
The full name for the RD entry (not including the report groups that follow it).

Report File
A file defined by means of an FD entry that has a REPORT clause.  Any of a wide range of physical realizations of report output that may be produced using report writer.

Report Group
A contiguous set of lines produced in one operation.  Also used, informally, to mean a Report Group Description.

Report Group Description
The set of entries, beginning with an 01-level entry, that describe a report group.

REPORT SECTION SUM
A SUM clause referring to a data-name that is defined in the REPORT SECTION.  The adding takes place by rolling forward or cross-footing.

Rolling Forward
Summing from a REPORT SECTION field into REPORT SECTION field in a different group, such as from a lower-level CF group into a higher-level CF.  (Distinguished from Cross-Footing.)

SOURCE SUM Correlation
An option, for compatibility with ANS-68 report writer, whereby for every non-REPORT SECTION SUM operand a check is made to see in which DETAIL groups, if any, the same item is a SOURCE.  Adding then takes place only for those operands whose referencing DETAIL group was GENERATEd.  (In the ANS-74 and ANS-85 standards, by contrast, a GENERATE causes all non-REPORT SECTION SUM operands to be accumulated into the totals that reference them.)

Special Register
A location such as PAGE-COUNTER, LINE-COUNTER, and CODE-VALUE that is defined automatically by report writer, rather than by the programmer, and may be accessed, usually under special conditions, to control the production of the report.

STYLE
A special property given to a file, report, line or elementary field that causes it to make use of a special effect available from the output device, such as UNDERLINE, COURIER, or LANDSCAPE.  STYLEs may be implemented in a number of different ways, all of them completely transparent to the programmer.

Subtotalling
An ANS report writer term for SUMming of a non-REPORT SECTION item.

Sum Counter
The ANS report writer term for total field, not used in this publication since "COUNT" now has a special significance as a clause.

Summary Reporting
The action that takes place when a GENERATE report-name statement is executed.  CONTROL HEADING or CONTROL FOOTING groups are the only body groups that can be presented.

Total Field
An internal register set up implicitly for each entry that has a SUM or COUNT clause.  The total field is incremented by the value indicated in the SUM operand until it is output, whereupon it is stored in the report line and reset to zero.  Its PICTURE is similar to the explicit PICTURE of the same entry, but without any editing characters.

TYPE
This term has two meanings in report writer.  The TYPE clause at the 01-level states how the report group is used in the report, for example TYPE PAGE HEADING.  In the SELECT...ASSIGN clause, the TYPE clause indicates the physical device to which the output is to be sent.

Unprintable Item
An elementary item that has no COLUMN clause.  It does not appear in the report line but may be totalled like any other item.

Variable-length Field
A report item that has either a "<" PICTURE symbol or a multiple-choice VALUE with no PICTURE and different-length "literals".

Variable-position Field
A report item whose horizontal position may be different from one appearance to the next because it contains a relative COLUMN clause and follows either a conditional or variable-length field, or another variable-position field.




Precompiler Messages



The following messages may be issued during precompilation under various circumstances.  Most are self-explanatory, but an additional explanation is given below for each of them.  The severity level of each message is also shown.  The meanings of these are as follows:

Severe (S)   Implies a serious violation of the rules of syntax or usage, such that the object program is not reliable - perhaps even incomplete - and should not be run.

Error (E)   Implies a violation of the rules of syntax or usage, but such that the resultant program will be executable, although the results will not necessarily be those expected.

Warning (W)   Implies a less severe violation of the rules, or a situation where a change to the code is preferable, although the program will execute as intended.

Inform- (I)   Is used for a confirmatory or informational message and does
ational   not imply any violation on behalf of the user.

Return codes are issued by the precompiler to indicate the most severe level of error.  They are listed in Installation and Operation.

Messages

Ident.-Sev.          Message and Explanation

CRW-001-I   No Report Writer data entries were found in this program.
The precompiler found no REPORT SECTION.  This is not an error, as the program need not contain report writer statements.

CRW-002-S   Clause xx not allowed in this context: ignored.
The given clause should not be coded in this type of entry.

CRW-003-S   Unrecognized item xx: discarded.
The given word was found when a new clause keyword was expected.

CRW-004-S   Report Writer statements in FILE-CONTROL/FILE SECTION but no REPORT SECTION.
The program contains a report writer clause in a SELECT...ASSIGN or FD entry but there is no REPORT SECTION.

CRW-007-S   No END DECLARATIVES found.
While processing the DECLARATIVES portion, the precompiler encountered the end of the source before END DECLARATIVES.

CRW-008-I   FD has record definition but no RECORD CONTAINS: compiler may assume variable-length.
If there is an 01-level entry following the FD for a report file, the record description generated by the precompiler may disagree with it in length, causing the compiler to assume that the file is RECORDING MODE V.  If the 01-level entry is not used in the program, it should be removed.

CRW-009-E   Word xx expected here: assumed.
The named word is compulsory for this clause.

CRW-010-E   No period after REPORT SECTION: assumed.
REPORT SECTION should be followed by a period (".") character.

CRW-011-S   RD absent or not in A-margin: assumed.
This fault may be the consequence of a fault in the coding of the REPORT SECTION header.

CRW-012-S   Clause xx not permitted in RD statement: ignored.
The precompiler is still scanning the RD statement but has found a clause that cannot be used there.  It is likely that a period has been omitted.

CRW-013-S   Clause/phrase xx not allowed in REPORT SECTION: discarded.
The named keyword is a recognized COBOL keyword but cannot be used in the REPORT SECTION.

CRW-014-S   No report-name follows RD.
A period or a keyword follows immediately after RD.  Report writer constructs a name in order to continue scanning.

CRW-015-S   This report-name has already been defined.
Each report-name can follow only one RD.

CRW-017-S   REPORT SECTION absent/misspelt: assumed.
An RD entry has been found without a correct REPORT SECTION header preceding it.

CRW-019-W   Report xx in FD has no REPORT SECTION entry.
A report-name has been declared in a REPORT clause of an FD but there is no RD entry for the report-name.  This situation is allowed by OS/VS and DOS/VS COBOL.  The superfluous report-name should be removed, together with the clause, if it is its only operand.

CRW-020-S   Group item has elementary clauses: ignored.
This message appears as a result of an illogical sequence of level-numbers.  For example, you may have coded:

 
                   03  LINE 1   COL 20  ...
                     05  COL 30 ...

   The first COLUMN clause is at a group level, but COLUMN must always  be at the elementary level.  This example should be re-coded:

 
                   03  LINE 1.
                     05  COL 20  ...
                     05  COL 30  ...

CRW-021-E   Clause xx empty: ignored.
This may be the result of using a reserved word as a data item, for example, CONTROLS ARE PAGE.

CRW-022-S   Clause xx cannot be repeated in entry: previous occurrence discarded.
This normally happens as the result of a missing period.

CRW-023-S   Invalid CODE Clause: ignored.
   The CODE clause is incorrect.

CRW-024-S   CODE too long for record: ignored.
The CODE value has too many characters and, taking into account the size of the longest print line (and possible carriage control character), would cause the record length implied by the RECORD CONTAINS clause to be exceeded.

CRW-026-S   FINAL/REPORT control not highest: ignored.
The keyword FINAL or REPORT, if included in the CONTROLS clause, must be the first (or only) operand.

CRW-027-S   Invalid control identifier.
This implies that an identifier used as a CONTROL is improperly formed.

CRW-028-E   No integer after PAGE LIMIT: assuming 60.
The integer was probably mistyped.

CRW-029-S   PAGE LIMIT not in range 1 to 9999: assuming 60.
The integer of PAGE LIMIT is not feasible.

CRW-030-I   PAGE LIMIT will never be reached.
This message is issued when there is no PAGE FOOTING and the [LAST CONTROL] FOOTING value is less than the PAGE LIMIT, or when there is a PAGE FOOTING but it does not reach the PAGE LIMIT.

CRW-031-W   PAGE LIMIT increased to value of LAST DETAIL or FOOTING.
The PAGE LIMIT must not be less than the value of LAST DETAIL or [LAST CONTROL] FOOTING.  It has been adjusted up to the higher value.

CRW-032-I   Length xx assumed for CODE identifier.
If the identifier form of the CODE clause is used, the number of characters to be assigned to the CODE is calculated by subtracting the LINE LIMIT (and the size of any carriage control character) from the record size given in the RECORD or BLOCK CONTAINS clause, rather than from the size of the identifier.  This message confirms the calculated length.

CRW-033-S   Values of PAGE sub-clauses invalid or not in sequence.
The integers of the HEADING, FIRST DETAIL, LAST DETAIL, and LAST CONTROL FOOTING sub-clauses and the PAGE LIMIT should be in non-descending order.

CRW-034-E   Size of CODE differs from other reports going to same file.
This situation is tolerated but, since the CODE literal is placed at the front of each output record, the output may be difficult to interpret.

CRW-036-I   Standard OS/VS code literal is normally length 1.
However with report writer, CODE values may be of any length.

CRW-037-S   Invalid level number: assuming xx.
This usually happens as the result of other faults in the code.

CRW-038-E   LINAGE not allowed with REPORT(S) clause in FD.
The LINAGE and REPORT(S) clauses are mutually exclusive.  If you are using report writer, do not code LINAGE or any of its phrases.

CRW-039-E   Report has no groups.
This is usually the result of the absence of a 01 level-number after the RD entry.

CRW-041-S   First level no. after RD not 01.
A value of 01 is assumed.

CRW-042-S   Group-name not unique: name discarded.
Each report group-name should be unique within the RD.

CRW-043-S   Invalid TYPE: assuming DETAIL.
The keyword after TYPE is not one of the standard names.

CRW-044-S   Already had TYPE xx: assuming DETAIL.
Two non-body groups of the same TYPE were found in one RD.

CRW-045-S   Clause xx allowed only at level 01: discarded.
The clauses TYPE, NEXT GROUP, GROUP LIMIT and REPEATED can be coded only at the 01 level.

CRW-047-S   TYPE xx not allowed without PAGE: assuming DETAIL.
TYPE PH and PF are allowed only if there is a PAGE clause in the RD.

CRW-049-S   Control in TYPE clause not declared: assuming DETAIL.
TYPE CH or CF should be followed by FINAL/REPORT or the name of one of the identifiers listed in the CONTROL(S) clause of the RD.

CRW-050-S   Already had CH/CF for this control: assuming DETAIL.
Each control identifier can appear in only one CH and/or one CF group (including multiple CF's).

CRW-051-W   Duplicated control: ignored.
The same control name cannot be used twice in a CONTROL clause.  (There is no restriction, however, on using the same field under a redefined name.)

CRW-052-I   No TYPE: assuming DETAIL.
The TYPE clause may be omitted, in which case DETAIL is assumed.

CRW-054-E   Absolute LINE not allowed in unpaged report: PLUS form assumed.
Without a legal PAGE clause, every LINE must be relative (LINE + or PLUS).

CRW-055-S   LINE value should be non-negative integer: ignored.
The integer of the LINE clause is not numeric or is negative.

CRW-056-S   NEXT PAGE option of LINE in unpaged report: discarded.
LINE [integer] ON NEXT PAGE is not allowed if there is no PAGE clause in the RD.

CRW-058-S   PLUS not allowed with NEXT PAGE: ignored.
The form LINE IS PLUS/+ integer ON NEXT PAGE is not allowed.

CRW-059-E   NEXT PAGE allowed only in first line of this group.
The LINE IS [integer] ON NEXT PAGE clause can only appear as the first LINE clause of a group, except in a TYPE RH or RF, or a MULTIPLE PAGE group.

CRW-060-W   Integer in NEXT PAGE below heading value.
In the LINE IS integer ON NEXT PAGE clause, the integer must not be less than the HEADING integer (default value 1).

CRW-061-E   Absolute line follows relative line.
This is not allowed if the first LINE of the group is relative, except in a MULTIPLE PAGE group.

CRW-062-W   Line position precedes previous line.
All absolute LINE numbers must be in strictly ascending order (taking into account possible ABSENT lines), except in a MULTIPLE PAGE group.

CRW-063-S   LINE clause subordinate to another LINE: ignored.
This condition arises when the OSVS option is not in effect and the LINE clauses in a report group are at different levels, for example:

 
             01  GROUP-01  TYPE DE   LINE NEXT PAGE.
                 05  COLUMN 20  ...
               03  LINE PLUS 1.
                 05  COLUMN 20  ...

It may be rewritten as follows:

 
             01  ...  TYPE DE.
               03  LINE NEXT PAGE.
                 05  COLUMN 20  ...
               03  LINE PLUS 1.
                 05  COLUMN 20  ...

This structure is accepted as written by OS/VS COBOL, DOS/VS COBOL, and by this implementation, provided the OSVS option is in effect, in which case a Warning CRW-064 appears.

CRW-064-W   LINE entries nested: previous LINE assumed level xx.
See the comments under CRW-063 above.

CRW-066-S   COLUMN value should be positive integer < 999: ignored.
The integer of the COLUMN clause is not feasible.

CRW-069-W   COLUMN should be subordinate to LINE: LINE + 0 assumed.
This message is issued when a COLUMN clause is found but there is no LINE clause containing it, for example:

 
                 01  TYPE IS PH.
                   03  COLUMN 30 ...

The same message appears if the OSVS option is not in effect and the COLUMN clause is coded at the same level as the preceding LINE clause (or higher), for example:

 
                   03  LINE 1  COLUMN 20 ...
                   03  COLUMN 30 ...

Here, the second COLUMN clause is not subordinate to any LINE clause.  A LINE PLUS ZERO clause is assumed in default.  This means that an unnecessary second record will be written so that the item will be printed in the position defined by the preceding LINE.  This structure should be re-coded as follows:

 
                   03  LINE 1.
                     05  COLUMN 20 ...
                     05  COLUMN 30 ...

If the OSVS option is in effect, Warning message CRW-070 appears instead and the additional LINE PLUS ZERO is not generated.

CRW-070-W   COLUMN entries following LINE assumed to be subordinate to it.
See under CRW-069 above.

CRW-071-S   NEXT GROUP value should be positive integer: discarded.
The integer following NEXT GROUP is not numeric or is negative or zero.

CRW-072-W   Recurrence of same absolute LINE merged with preceding.
This message may be result from the following type of construct when the option OSVS is in effect:

 
                   03  LINE 1  COLUMN 10 ...
                   03  LINE 1  COLUMN 30 ...

The two COLUMN entries should be brought together under a single LINE 1 entry, but OS/VS and DOS/VS COBOL allow this construct, as does the precompiler also.

CRW-074-S   NEXT GROUP absolute or NEXT PAGE in unpaged report: PLUS assumed.
The forms NEXT GROUP IS integer and NEXT GROUP NEXT PAGE are not allowed unless there is a PAGE clause in the RD.

CRW-075-S   Invalid PICTURE: PICTURE X substituted.
The PICTURE clause has an invalid symbol, or an invalid combination of symbols or lacks a compulsory symbol.

CRW-076-S   PICTURE too long: truncated to 32 symbols.
There is a limit of 32 characters on a PICTURE string.

CRW-081-S   Invalid literal: clause or phrase ignored.
A literal is expected here but the item found is not correct.

CRW-082-S   Invalid integer: clause or phrase ignored.
An integer is expected here but the item found is not correct.

CRW-083-W   Hexadecimal value defined as printable text rather than by STYLE clause.
Although hexadecimal values are allowed in the REPORT SECTION, their usual purpose is to put control characters in the print data.  A more system-independent method is to use the STYLE clause.

CRW-084-S   Invalid identifier or expression: clause or phrase ignored.
An identifier or expression is expected here but the item found is not correct.

CRW-085-I   New reserved word accepted as data-name.
Clauses such as SOURCE IS STEP or SUM OF FUNC are recognized as correct even though STEP and FUNC are report writer keywords.  This allow older code to continue to function without change.

CRW-086-W   CF group refers to identifier that is not a CONTROL: after-break value may be used.
You have specified an identifier in a SOURCE clause within a CONTROL FOOTING group and the identifier is not a CONTROL or a SUM total field.  This message reminds you that only CONTROL items are restored to their before-the-break values during the processing of CONTROL FOOTING groups.  If the data item referred to normally changes at control-break time, you will obtain its after-the-break value (unless the item is a redefinition of, or subordinate to, a CONTROL item) and this may not be what you intended.  To obtain the before-the-break value, you could define a Declarative section for the CONTROL HEADING.  If the data item does not change at control-break time, this message should be ignored.

CRW-087-S   Control in RESET phrase not declared: discarded.
Except for FINAL or REPORT, the identifier specified in the RESET phrase must be declared in the CONTROL clause.

CRW-088-W   RESET at lower level than associated SUM clause.
If SUM and RESET are used in a TYPE CF group, the control used must be at the same level or a higher level than that of this CF group.

CRW-089-W   Elementary item must have data-name or SOURCE etc.
Every elementary item should have either SOURCE, or VALUE, or SUM/COUNT, or FUNCTION clause, or should carry a data-name.

CRW-090-S   LINE...NEXT PAGE not allowed in this type of group.
It is not allowed in a TYPE PH or RH group.

CRW-094-W   First LINE number will cause group to be positioned higher than top limit.
The first LINE number of the group is such that the group will start higher (earlier) than its highest permissible position on the page.

CRW-096-W   LINE clauses in group will cause it to extend beyond bottom limit.
The last LINE number of the group is such that the group will end lower than its lowest permissible position on the page.

CRW-098-W   PRESENT should not precede WHEN/UNLESS if used as qualifier for previous clause.
The WHEN phrase of the STYLE clause is not normally preceded by PRESENT.  If you have written something like:

 
                05  COL 1    VALUE "Payment overdue"  STYLE UNDERLINE
                    PRESENT WHEN W-DATE < W-TODAY.

note that the condition immediately following the STYLE clause is assumed to qualify just the STYLE clause, so this should be re-written as:

 
                05  COL 1   STYLE UNDERLINE   VALUE "Payment overdue"
                    PRESENT WHEN W-DATE < W-TODAY.

CRW-099-E   ABSENT not allowed before qualifying condition.
The STYLE clause cannot be immediately followed by an ABSENT clause and the order of the clauses should therefore be changed.

CRW-100-W   WHEN OTHER allowed only with multiple choice.
The clause [PRESENT] WHEN OTHER cannot be used in isolation.  That is, there must be at least one [PRESENT] WHEN condition clause in the same entry.

CRW-106-W   This RH group will have own page: NEXT GROUP NEXT PAGE assumed.
If NEXT GROUP NEXT PAGE is not used in an RH group, report writer will try to fit the group on the first page above the PH group.  If that cannot be done, this message is issued.

CRW-107-W   This RF group will have own page: NEXT PAGE assumed.
If LINE...NEXT PAGE is not used in an RF group, report writer will try to fit the RF group on the last page below the PF group.  If that cannot be done, this message is issued.

CRW-110-I   Elementary item has no size: will not be output.
This message occurs when the PICTURE clause is omitted from an elementary item and there is no way of telling its size, such as from a VALUE "literal" as, for example:

 
                05  COLUMN 21    SOURCE IS WS-PAYMENT.

A PICTURE clause is always required at the elementary level except (a) with a simple VALUE "literal".  However, OS/VS and DOS/VS COBOL allow the PICTURE to be omitted and treats the field as unprintable, so this technique was often used in the past to enable an item to be used in a SUM when it was not also being used as a SOURCE.

CRW-112-W   Absolute NEXT GROUP position not beyond last line position.
The integer of a NEXT GROUP integer clause in a TYPE RH or PF group must be greater than the last line position in the group.

CRW-113-W   NEXT GROUP position out of range.
Either the current group is a REPORT HEADING and the NEXT GROUP is beyond the FIRST DETAIL, or the current group is a PAGE FOOTING and the NEXT GROUP is beyond the PAGE LIMIT.

CRW-114-W   Absolute NEXT GROUP not in range FIRST DETAIL to FOOTING.
The integer of a NEXT GROUP integer clause in a body group must be in that range.

CRW-115-S   NEXT GROUP not allowed in types PH and RF: ignored.
To provide spacing following a Page Heading, the FIRST DETAIL clause may be used.

CRW-122-S   SUM clause has nonnumeric PICTURE: ignored.
The PICTURE clause was probably mistyped.

CRW-124-S   Group-name in UPON phrase is unknown or ambiguous.
An UPON phrase is followed by a name that is either not a group-name or requires qualification.

CRW-125-E   UPON group not type DETAIL.
It is not possible to SUM ... UPON a group that is not TYPE DETAIL.  If the field is a SOURCE in the group, you may instead give a data-name to the entry and SUM that data-name.

CRW-126-E   Rolling forward of SUM from higher to lower CF group not allowed.
An attempt is being made to SUM a field in a higher CONTROL FOOTING and print the total in a lower CONTROL FOOTING.

CRW-127-E   Report-name qualifier required: IN xx assumed.
The same group-name is in use in more than one report.  The name in the first report is arbitrarily chosen.

CRW-128-S   Qualifying report-name invalid.
The only qualifier accepted following a sum counter, group-name or special register is the report-name itself.

CRW-131-S   Name following GENERATE not report or detail group.
The name following GENERATE is probably misspelt.

CRW-132-S   Name following INITIATE/TERMINATE not report: ignored.
The name following INITIATE or TERMINATE is probably misspelt.

CRW-133-E   Cannot do summary reporting without CONTROLS clause.
This may be issued if GENERATE report-name is coded erroneously instead of GENERATE detail-name.

CRW-134-S   SUPPRESS allowed only in DECLARATIVES: ignored.
A SUPPRESS keyword has been found outside the DECLARATIVES part of the program.

CRW-135-S   Invalid operand after USE BEFORE REPORTING: section discarded.
The directive USE BEFORE REPORTING must be followed by the name of a report group.

CRW-136-S   "xx".. not allowed in Report Writer DECLARATIVES.
This is issued if an INITIATE, GENERATE, or TERMINATE is found in the DECLARATIVES part of the program.

CRW-137-E   Report Writer verb has no operands: ignored.
The verb INITIATE, GENERATE, or TERMINATE is followed immediately by a period, another verb, or the end of the source.

CRW-138-S   Group already has DECLARATIVES section.
There can only be one DECLARATIVES section for any given report group.

CRW-139-W   USE AFTER EXCEPTION/ERROR DECLARATIVE not used by file-handler.
Independent Report File Handlers cannot access the USE AFTER EXCEPTION or USE AFTER ERROR DECLARATIVE section for the file they control.  This message warns that the section will have no effect.  A FILE STATUS should be created and tested after each operation instead.

CRW-142-W   No INITIATE statement found for this report.
Check that INITIALIZE was not coded by mistake instead of INITIATE.  This message and the next are issued only if there is a GENERATE statement referring to the report.

CRW-143-W   No TERMINATE statement found for this report.
See notes under CRW-142 above.

CRW-144-W   MODE more than 4 characters: excess ignored.
Report writer generates the name CRFHxxxx for the name of the Independent Report File Handler, so 4 is the limit.

CRW-145-E   MODE not allowed where record descriptions follow FD: discarded.
A report file that is written using an Independent Report File Handler cannot process any records other than those implicitly defined in the REPORT SECTION.  If the (01-level) record description is not referred to (via a WRITE statement) anywhere in the program, it should be omitted.  Otherwise, a way should be found to write the record by means of additional code in the REPORT SECTION.  The file handler itself may also be enhanced to write special records to the print file.

CRW-146-I   No GENERATE issued for this DETAIL.
There is no GENERATE statement in the PROCEDURE DIVISION referring to this DETAIL group-name.

CRW-148-S   Invalid UPON file-name.
The file-name specified in the INITIATE...UPON is not defined in the FILE SECTION or it is not a report file or its REPORT(S) clause does not include the report-name (or one of the report-names) given in the INITIATE.

CRW-149-E   Report assigned to more than one FD: file handler DUPL required.
OS/VS and DOS/VS COBOL allowed a report-name to be defined in the REPORT(S) clause of up to two FD's.  This property is now emulated using the DUPL file handler.  You should code MODE DUPL in the SELECT ... ASSIGN statement for both files, or use the precompiler's FMODE option.

CRW-151-W   Superfluous period: ignored.
This message will appear if an excess period appears between the level-number and the last clause in the entry, for example:

                05  COLUMN 21.  PIC Z(5)9.  SOURCE IS WS-INCOME.

CRW-152-E   Period missing: assumed.
This message will appear if no period appears at the end of an entry before the next level-number or heading.  Occasionally, this may be the result of coding a superfluous numeric literal that is wrongly assumed to be a new level-number.

CRW-161-I   SUM will be totalled UPON generation of xx due to SOURCE SUM correlation.
In an original report writer program that has more than one DETAIL group, this message should be expected for every SUM operand which is not the name of another REPORT SECTION item.  This message confirms that SOURCE SUM correlation is in effect (one of the supplied defaults which is essential when an original OS/VS or DOS/VS COBOL source is processed).  Report writer has searched the SOURCE clauses in all the DETAIL groups for the same identifier as that specified in the SUM clause and has found it in DETAIL xx .  It will perform the adding when, and only when, DETAIL xx. is GENERATEd.  This message tells you exactly when adding of the SUM operand takes place.

CRW-162-I   SUM will be totalled also UPON generation of xx.
This is used in combination with message CRW-161.  It indicates that the SUM operand was found in more than one DETAIL group.  Adding will take place when either the DETAIL named in message CRW-161-I or the DETAIL named in this message is GENERATEd.

CRW-163-W   Item not in REPORT SECTION is accumulated on every GENERATE.
The SUM clause referenced has an identifier from a SECTION other than REPORT SECTION, there are more than one DETAIL groups and either there is no SOURCE SUM correlation or the same identifier does not appear as a SOURCE in any DETAIL of the report.  This message reminds you that adding will take place on the execution of a GENERATE for any DETAIL in the same report, in accordance with the ANS-85 standard.  This message should not appear for any program written originally for OS/VS or DOS/VS COBOL, as the previous compiler would not have generated any adding for the SUM entry in these circumstances and a zero value should have resulted.

CRW-165-W   Sum counter may be accumulated without being cleared.
There is a RESET phrase for a total field that is also used for rolling forward to another SUM.  Some values will therefore be rolled forward several times into the same total, which is therefore suspect.

CRW-166-W   UPON phrase not allowed with SUM of Report Section entry.
It is not permissible to use the UPON phrase if the item added is a REPORT SECTION data-name.  REPORT SECTION items are added in whenever their group is produced.

CRW-167-S   REPORT SECTION entry referred to by SUM must be numeric.
Only a numeric entry may be the object of a SUM.  However, a COUNT clause may be used to count the occurrences of any entry.

CRW-168-S   RESET without SUM or COUNT clause: discarded.
The RESET phrase has no meaning except in conjunction with a SUM or COUNT clause.

CRW-171-S   Invalid SIGN clause: discarded.
The SIGN clause is malformed.

CRW-172-S   BLANK WHEN ZERO not applicable: discarded.
BLANK WHEN ZERO can only be associated with numeric items.

CRW-173-E   Entry contains both DBCS and non-DBCS fields.
If the entry has a multiple VALUE clause, either all the literals must be DBCS or all must be non-DBCS.

CRW-174-E   DISPLAY-1 group must contain only DBCS fields.
If DISPLAY-1 is coded on a group level, every subordinate entry must be DBCS, that is, it must have a DBCS PICTURE ("G" symbol) or a DBCS literal VALUE, or both.

CRW-180-E   CODE not allowed in RD where a record description follows FD.
The report associated with this file has a CODE clause, but the FD is followed by an 01-level record description.  Since all the records written to the file should have the additional "CODE" characters attached, it is not permissible to WRITE records independently of report writer.  If the 01-level record description is not referred to, it should be deleted.

CRW-181-E   PAGE BUFFER/DUPLICATED not allowed in RD whose FD has a record description.
The PAGE BUFFER and DUPLICATED clauses imply a special organization of the report file or its records and it is not permissible to WRITE records independently of report writer.  If the 01-level record description is not referred to, it should be deleted.

CRW-184-W   Some SELECT clauses will be ignored by file handler and may be invalid.
The MODE clause causes the report to be output using an Independent Report File Handler.  The phrases RESERVE integer AREA(S), PADDING CHARACTER, RECORD DELIMITER, and PASSWORD of the SELECT...ASSIGN clause are not processed by the file handler and are treated as documentary only.

CRW-185-W   Some FD clauses will be ignored by file handler and may be invalid.
The MODE clause causes the report to be output using an Independent Report File Handler.  The FD phrases CODE-SET, RECORD IS VARYING..., BLOCK CONTAINS integer RECORDS, LABEL RECORD(S) IS/ARE data-name, and VALUE OF... are not processed by the file handler and are treated as documentary only.

CRW-190-E   "xx" does not conform to chosen language level.
The precompiler has been installed to accept only a subset of the available language and the specified item is not in that subset.

CRW-191   "xx": nonconforming nonstandard, yy extension to ANS/ISO 1985 Report Writer module.
This message appears as a result of the FIPS option to flag nonstandard IBM and SPC extensions to the current standard.

CRW-192   "xx": nonconforming standard, ANS/ISO 1985 Report Writer module.
This message appears as a result of the FIPS option to flag standard elements above a specified level.

CRW-193   "xx": obsolete element in ANS/ISO 1985 Report Writer module.
This message appears as a result of the FIPS option to flag all obsolete elements.

CRW-200-I   MODE PRNT has been assumed for file due to CODE clause.
If a file has more than one report whose RD's do not all have a CODE of equal length, the file can only be processed by an Independent Report File Handler.  The file is therefore treated as though MODE PRNT had been coded.

CRW-201-I   Scanning to next recognizable period or keyword.
This message is issued after a more serious error to document the precompiler's error-recovery processing.

CRW-202-W   No associated FD: MODE PRNT assumed.
Each RD's report-name must appear in the REPORT clause of an FD as well as in the RD.  The precompiler supplies a file by default and, for simplicity, implements it via the PRNT file handler.

CRW-203-E   REPORT SECTION nest level must not exceed 23.
This is the limit to the number of different levels of nesting allowed using level-numbers in the REPORT SECTION.

CRW-204-I   Data-name accessible in REPORT SECTION only.
This message is issued when an entry has a data-name that the precompiler cannot retain when generating the intermediate data description.  Possible reasons for this are: (a) the LINE is subject to an OCCURS clause and, as lines are generated only once, the dimensions of the data-name would be insufficient; (b) the item has a PICTURE clause with an "<" symbol and this would be incomprehensible to basic COBOL.

CRW-206-S   PLUS integer allowed only with FOOTING: ignored.
The HEADING, FIRST DETAIL and LAST DETAIL clauses have no PLUS integer form.

CRW-208-S   OCCURS clause not allowed at level 01.
Perhaps a REPEATED clause was intended.  This is used at level 01 to print several body groups across the page.

CRW-210-S   LINE LIMIT invalid: clause ignored.
The LINE LIMIT clause is malformed.

CRW-211-S   LINE LIMIT too high for record/CODE.
The LINE LIMIT exceeds the maximum number of bytes available in the print line, taking into account an existing CODE.

CRW-212-E   CODE identifier form not allowed without LINE LIMIT.
If the identifier form of the CODE clause is used, a LINE LIMIT clause must be present.

CRW-213-I   Value xx assumed for LINE LIMIT.
This message is always issued if there is no LINE LIMIT clause in an RD.  It gives the rightmost value allowed for any COLUMN and enables report writer to ensure that none of your print lines will be truncated because they are wider than one printer's width.  This default value is calculated from the RECORD CONTAINS or BLOCK CONTAINS clause in the corresponding FD (allowing for the carriage control character), or, failing that from the installed default (see Installation and Operation).  It should be checked to ensure that the value is as expected.  (See LINE LIMIT Clause.)

CRW-214-I   SOURCE/SUM will show same value in each repetition.
An OCCURS clause or multiple LINES or COLUMNS clause is in effect but the same SOURCE or SUM value will be placed in each occurrence because there are no subscripts to be varied, or there are subscripts but no VARYING clause.

CRW-215-S   More than one unconditional SOURCE etc.: previous discarded.
More than one SOURCE, VALUE clause, etc. has been found and there are no associated [PRESENT] WHEN condition clauses to indicate a multiple-choice entry.

CRW-216-S   Condition has unpaired left parenthesis or reserved word.
A major keyword, or a period, or the end of the source was found before the expected closing parenthesis (")") while scanning a condition.

CRW-218-S   Item xx found out of context and ignored.
The given item was not expected in this context.

CRW-220-S   Illegal OCCURS integer: clause discarded.
An integer of this OCCURS clause was non-numeric.

CRW-221-S   OCCURS...TO maximum must exceed minimum: TO phrase discarded.
The second integer in an OCCURS...TO clause must be greater than the first integer.

CRW-222-S   Minimum OCCURS integer negative: clause ignored.
The first integer in an OCCURS...TO clause must be zero or greater than zero.

CRW-223-S   OCCURS integer must be positive: clause discarded.
The integer in a basic OCCURS clause or the second integer in an OCCURS...TO clause should be greater than zero.

CRW-224-S   Invalid identifier/expression in DEPENDING ON: phrase discarded.
This may be due to the use of a SUM or COUNT term in the expression.

CRW-225-S   OCCURS...TO format allowed only with DEPENDING.
A DEPENDING ON... phrase was expected following the OCCURS...TO clause.  The first integer is discarded.

CRW-226-S   Depth of repetition exceeds 4: clause discarded.
Only up to four nested levels of OCCURS or multiple LINES or COLUMNS are allowed.

CRW-229-S   More than 8 levels of OCCURS or PRESENT etc.
Only up to eight levels of PRESENT WHEN, PRESENT AFTER, or GROUP INDICATE clauses, or repetition are allowed, including up to 4 levels of nested OCCURS, multiple LINES, or multiple COLUMNS.

CRW-230-S   Invalid FUNCTION: clause ignored.
This is issued if the function name is malformed.

CRW-231-E   No closing parenthesis in FUNCTION: assumed.
A major keyword, or period, or end of source was found before the closing parenthesis following the parameters to a FUNCTION clause.

CRW-232-S   Summed REPORT SECTION item must have SOURCE, SUM or VALUE.
A SUM was found of a REPORT SECTION item, but the item has no SOURCE, SUM, or VALUE clause.

CRW-233-S   Misuse of < symbol in PICTURE: ignored.
The "<" symbol may only be used immediately preceding a PICTURE symbol representing "data" as opposed to an insertion character.

CRW-235-E   Report has > 1 CONTROL, so control-id must be specified in TYPE CH.
TYPE CH must be followed by one of the identifiers (or REPORT / FINAL) listed in the CONTROL(S) clause.

CRW-236-S   GROUP INDICATE/PRESENT AFTER not allowed in RH or RF groups.
A TYPE REPORT HEADING or REPORT FOOTING group cannot have a GROUP INDICATE clause or a PRESENT AFTER... clause.

CRW-237-S   Undeclared control in GROUP INDICATE/PRESENT AFTER: discarded.
All control names must first be declared in a CONTROL clause.

CRW-238-S   Invalid GROUP INDICATE syntax: default format assumed.
The ON/FOR phrase is incomprehensible, so the simple (no-operand) GROUP INDICATE format is assumed.

CRW-239-S   PAGE option used in unpaged report: PAGE discarded.
There is no (valid) PAGE clause in the RD and hence none of the options using the keyword PAGE can be used.

CRW-240-S   REPEATED invalid in dummy or multiple-page group.
A group with a REPEATED clause must have at least one LINE and must not have a MULTIPLE PAGE clause.

CRW-241-S   Invalid REPEATED syntax: clause ignored.
The REPEATED clause is malformed.

CRW-242-S   Too many repeats for available LINE LIMIT.
The LINE LIMIT cannot accommodate the number of repetitions given in the TIMES phrase.  If an EVERY/WIDTH phrase is given, the spacing given is too wide, or, if not, the desired number of repetitions cannot fit, even at the closest possible spacing.

CRW-243-S   REPEATED allowed only in body groups: clause ignored.
The REPEATED clause can be used only in a TYPE CH, DE, or CF group.

CRW-244-S   REPEATED must have EVERY or TIMES: ignored.
Either the TIMES phrase or the EVERY/WIDTH phrase or both must be present in the REPEATED clause.

CRW-245-E   Repeats of this group will overlap.
Running the program will result in encroachment between successive side-by-side groups with unpredictable results.

CRW-246-S   Invalid condition: clause ignored.
The condition following a PRESENT/ABSENT clause was syntactically invalid.

CRW-247-E   Superfluous PRESENT/GROUP INDICATE/ERROR found: discarded.
This fault is usually the result of a missing period.

CRW-248-E   GROUP IND./PRESENT AFTER cannot be part of multiple choice.
The only conditional clauses allowed in a multiple choice entry must be of the form [PRESENT] WHEN condition.

CRW-249-E   GROUP IND./PRESENT AFTER in CONTROL group must refer to higher level.
If a PRESENT AFTER control [OR PAGE] clause is written in a CH or CF group, the control referred to must be at a higher level than that of the group.

CRW-250-W   Item overlaps or is to left of item in same line.
This message is issued if two unconditional horizontal items overlap or if their COLUMN numbers are not in ascending sequence.  It will also appear in cases where a conditional item could overlap an unconditional one.  The item will be accepted as defined.  If it does not overlap any of the column positions of a previous field in the line, there will be no problem at run time.  Otherwise, the earlier field will be overlaid, in whole or in part, by the new item.

CRW-251-I   Column overlap may occur in this line.
This message is issued if some of the items in the report line have PRESENT WHEN clauses without which they would overlap.  The precompiler assumes that the programmer has taken action to ensure that the conditions are mutually exclusive.

CRW-253-I   Final COLUMN position may exceed line limit.
This message is issued if some of the items in the report line have PRESENT WHEN clauses without which they would exceed the size of the line.

CRW-254-E   Abs. line follows relative with no unconditional abs. lines.
An absolute LINE clause (no +) cannot follow a relative LINE (with +) unless there is an unconditional absolute LINE earlier in the group.

CRW-255-E   REPEATED absolute group must have at least 1 unconditional LINE.
It is not possible for all the LINE entries in a group with a REPEATED clause to have a PRESENT/ABSENT/GROUP INDICATE clause, unless they are all relative (with PLUS or +).

CRW-256-S   Nonnumeric SOURCE or non-REPORT SECTION SUM cannot be ROUNDED.
ROUNDED can only be used with (a) a numeric SOURCE or (b) a SUM clause that refers to another REPORT SECTION item.

CRW-257-S   Final column position in line exceeds limit.
The rightmost column of this line exceeds the value of LINE LIMIT.  The line will be truncated.

CRW-258-E   Line overlap: LINE PLUS 1 assumed.
This message will be issued if two unconditional absolute lines overlap.  It will also appear in cases where a conditional absolute line could overlap an unconditional one.

CRW-259-I   Line overlap may occur in this group.
This message is issued if some of the lines in the group have PRESENT WHEN clauses without which they would overlap.  The precompiler assumes that the programmer has taken care to ensure that the conditions are mutually exclusive.

CRW-260-I   This group may extend beyond lower limit.
This message is issued if some of the lines in the group have PRESENT WHEN clauses, which, if all present, would exceed the maximum size of the group as defined in the PAGE LIMIT sub-clauses or the GROUP LIMIT clause.

CRW-261-S   Circular reference of sum totals: no summing.
This message is issued if circular combinations of cross-foot SUM's are used, such as:

                  A SUM A, or:
                  A SUM B --- B SUM A, or:
                  A SUM B --- B SUM C --- C SUM A etc.

CRW-262-E   Number of occurrences of addend and SUM field differ at level xx.
This message is issued in the following case:  a SUM clause is subject to repetition (OCCURS or multiple LINES / COLUMNS); an item referred to in the SUM clause is a REPORT SECTION item that also has repetition.  After matching the axis of each repetition (LINE against LINE, COLUMN against COLUMN, group of LINES against group of LINES and group of COLUMNS against group of COLUMNS), it is found that the numbers of occurrences along the matching axis are not the same.

CRW-263-S   Repetition affecting SUM field has no equivalent for summand.
This message is issued when a SUM clause has repetition (OCCURS clause or multiple LINES / COLUMNS) and an item referred to in the SUM clause is a REPORT SECTION item but has no repetition along the axis of repetition of the SUM.  Briefly: a multiple SUM cannot be manufactured from a single original value.

CRW-265-W   UPON phrase required in running total in type DETAIL.
This message is issued if a SUM clause is found in a DETAIL group and the item summed is not in the REPORT SECTION.  The precompiler cannot ascertain when adding is to take place unless an UPON phrase is included.

CRW-266-E   Rolling forward not allowed between these types.
It is not permitted to roll forward into a REPORT HEADING group or from a REPORT FOOTING group.

CRW-267-S   No subscripts allowed on SUM of REPORT SECTION entry.
The SUM identifier must be without subscripts when it refers to an entry in the REPORT SECTION.

CRW-270-S   SUM OVERFLOW clause is invalid: discarded.
The SUM OVERFLOW clause is malformed.

CRW-274-S   Leftmost COLUMN position less than one: COLUMN PLUS 1 assumed.
This message is associated with the RIGHT and CENTER forms of the COLUMN clause.

CRW-275-S   Invalid MODE clause: discarded.
The MODE clause is malformed. (The mode name should not be in quotes or apostrophes.)

CRW-276-S   Invalid or duplicated phrase after MODE: discarded.
One of the phrases or clauses USING, WITH PAGE BUFFER, or DUPLICATED is either malformed or occurs more than once.

CRW-277-S   Invalid DUPLICATED integer: phrase discarded.
No valid integer follows the DUPLICATED keyword.

CRW-278-I   MODE xx has been assumed for file due to clauses in FILE-CONTROL entry.
To implement certain features, such as PAGE BUFFER and DUPLICATED, the independent report file handler protocol is required, rather than direct "WRITEs".  If there is not already a MODE clause, report writer handles the file as though a MODE clause had been coded.

CRW-281-S   SET statement has invalid syntax: discarded.
The SET PAGE/LINE/COLUMN statement is malformed.

CRW-282-S   SET statement not allowed with report that has no page buffer.
The SET PAGE/LINE/COLUMN statement cannot be used unless the corresponding SELECT...ASSIGN clause has a WITH PAGE BUFFER clause.

CRW-283-S   Integer of SET statement is out of range.
An attempt is being made to SET the LINE or COLUMN outside the dimensions of the page.

CRW-287-E   RESET not allowed in multiple CF group.
RESET cannot be used with a SUM or COUNT clause in a multiple CONTROL FOOTING because several levels of totalling are implied.

CRW-288-I   TYPE CF with no operands assumed to be multiple CF for all controls.
If TYPE CONTROL FOOTING is coded with no control-id operand following, it is taken to mean CONTROL FOOTING FOR ALL.

CRW-290-E   Mis-use of CONTROL IS control-id condition.
The special condition CONTROL IS control-id can only be used in a multiple TYPE CONTROL FOOTING that has that control-id as one of its operands.

CRW-291-W   UPON phrase refers to current group.
The operand used in the UPON phrase should refer to the name of a different group.

CRW-293-W   SUM of item with GROUP INDICATE/PRESENT AFTER may be incorrect.
If the item quoted in the SUM clause is subject to one of these clauses, it cannot be reliably totalled, since report writer will, on principle, not total fields that ordinarily will not be Present.

CRW-294-W   Summed REPORT SECTION name xx is ambiguous: first occurrence used.
Either (a) the given data-name, the operand of a SUM clause, is either defined in more than one place within the current report (in which case the names should be made different) or (b) the given data-name is not defined in the same report but is defined in more than one different report (in which case report-name qualifiers should be used).

CRW-295-I   Maximum number of repetitions will be xx.
In the absence of a TIMES phrase, report writer has calculated from the rest of the EVERY/WIDTH phrase of the REPEATED clause and the LINE LIMIT that this many repetitions of the group can be arranged side-by-side.

CRW-296-I   Distance between REPEATED groups assumed to be xx COLUMNS.
In the absence of an EVERY/WIDTH phrase, report writer has calculated from the TIMES phrase and the LINE LIMIT that the distance between corresponding repetitions will be that many columns.

CRW-297-W   Absolute LINEs subject to REPEATED or WRAP cannot all be conditional.
For the REPEATED or WRAP clause to work correctly, report writer must know at precompilation time whether the group will be absolute or relative.  If all the absolute LINE clauses have a condition attached, this cannot be done.

CRW-301-W   Multiple LINE or COLUMN should not be blank.
An entry containing a LINE clause with more than one operand should be followed by at least one subordinate COLUMN entry.  An entry containing a COLUMN clause with more than one operand should also contain a SOURCE, SUM, VALUE, or FUNCTION clause.

CRW-302-S   Number of SOURCE items etc. does not match number of repetitions.
With a multiple SOURCE or VALUE, there must be an equal number of repetitions either as an OCCURS or as a multiple LINES or COLUMNS clause.

CRW-303-S   OCCURS not allowed in entry with multiple LINE/COLUMN.
It is not permissible to combine an OCCURS and a LINE or COLUMN with multiple operands in the same entry.

CRW-304-S   STEP/WIDTH/DEPTH allowed only with OCCURS.
The STEP/WIDTH/DEPTH clause cannot be coded unless there is a valid OCCURS clause in the same entry.

CRW-305-E   STEP/WIDTH/DEPTH not allowed in blank item.
The STEP/WIDTH/DEPTH clause is not allowed in an elementary entry that has no COLUMN clause (actual or implied).

CRW-306-S   STEP/WIDTH/DEPTH less than size of field: xx assumed.
The distance given in the STEP/WIDTH/DEPTH clause must be at least the size (horizontal or vertical) of the item it applies to.

CRW-307-W   Wrong axis implied by STEP/WIDTH/DEPTH.
The keyword LINES may only be used in the vertical direction and COLUMNS in the horizontal direction.

CRW-308-W   Scope of OCCURS includes absolute entry: minimum STEP (xx) assumed.
An OCCURS clause includes within its scope an absolute entry (LINE or COLUMN without "+").  The value given is the minimum distance that may be assumed between adjacent entries.

CRW-309-S   Mult. SOURCE/VALUE not subject to fixed OCCURS or mult. LINE/ COLUMN.
A multiple SOURCE or VALUE clause must be associated with either OCCURS without DEPENDING or a multiple LINES or a multiple COLUMNS.

CRW-310-E   SOURCE NONE allowed only in multiple entry.
SOURCE NONE can be used only as part of a multiple-operand SOURCE clause.

CRW-311-S   Multiple LINE numbers must increase: PLUS 1 assumed as necessary.
In a multiple LINES clause, absolute line numbers must be strictly increasing.

CRW-313-E   REPORTS ALL already encountered: ignored.
REPORTS ARE ALL can only be coded once per program.

CRW-314-W   ALL should be only REPORT(S) operand: will be applied to unassigned reports.
REPORTS ARE ALL must be coded without any report-names and must be the only REPORT(S) clause in the program.

CRW-315-S   Invalid operand for VARYING.
An operand following VARYING is not one of the permitted forms.

CRW-316-S   VARYING allowed only with OCCURS or multiple LINE/COLUMN.
The VARYING clause can be used only if there is an OCCURS clause or a multiple LINES or COLUMNS clause in the same entry.

CRW-317-E   VARYING data-name duplicated.
This message is issued if the same data-name has been used twice in the same VARYING clause.

CRW-318-S   Invalid VARYING data-name.
The names DATA-SUB-1/2/3/4 cannot be used as VARYING operands.

CRW-319-E   VARYING data-name already in use in an enclosing entry.
It is not permissible to use the same data-name for two nested VARYING clauses.

CRW-320-S   REPORT SECTION item cannot appear in expression in SUM clause.
The use of SUM expression is permitted only if all the items in the expression lie outside the REPORT SECTION.

CRW-321-S   Expression summed cannot contain SUM: parentheses required.
Expressions of the type SUM A + SUM B are not allowed because the SUM operand binds the entire arithmetical expression.  For example, SUM A + B means SUM (A + B) not (SUM A) + B.  The expression SUM A + SUM B must therefore be written (SUM A) + (SUM B).

CRW-322-S   Only SOURCE expression can contain SUM.
The SUM or COUNT term cannot be used in a DEPENDING ON expression, as a parameter to FUNCTION, or as part of a conditional expression.

CRW-323-S   SUM not allowed in multiple-choice entry.
The SUM clause or SUM term cannot be used in a multiple-choice entry.  The code should be rewritten using separate entries.

CRW-324-E   SUM in lone DETAIL not allowed except as cross-foot.
If the report contains only one DETAIL group, that group cannot contain any SUM clauses except for cross-footing (totalling items within the same group).

CRW-325-S   COUNT does not refer to REPORT SECTION entry.
Only an entry defined in the REPORT SECTION can be counted.

CRW-326-W   Data-name of VARYING referred to in FROM or BY expression.
The FROM or BY expression of a VARYING clause refers to its own data-name.  This may lead to unpredictable results.

CRW-327-S   COUNT cannot be followed by expression or literal.
Only simple data-names can be used in the COUNT clause.

CRW-328-S   RESET cannot be used with SUM/COUNT expression.
RESET is only allowed with the basic SUM or COUNT clause, not when they are a term in an expression.

CRW-329-E   Multiple-choice entry not allowed at LINE level.
The LINE clause cannot be written at the same level as COLUMN when the entry is a multiple-choice entry.  They should be written at different levels.

CRW-330-E   Printer TYPE xx not recognized: default TYPE assumed.
The Printer Description File for the given "printer type" in the SELECT clause cannot be found.

CRW-331-W   STYLE xx is already in effect.
The given style is unnecessary since it is already in effect having been defined at a higher level.

CRW-332-E   Unknown STYLE name "xx": changed to NORMAL.
The given style cannot be found in the Printer Description File.

CRW-333-E   No code defined for this STYLE clause: changed to NORMAL.
This particular combination of styles is not permitted (although each style-name is valid).

CRW-334-E   Contradictory combination of STYLEs: changed to NORMAL.
You have coded two or more styles in combination that belong to the same mutually-exclusive class.

CRW-337-E   STYLE not allowed in unprintable entry.
An group entry with a STYLE clause must define at least one line or print column.  (However, you can code STYLE in an elementary dummy entry.)

CRW-339-S   STYLE within multiple-choice selection cannot have condition.
A construct of the form:

 
                05  COL 1  VALUE "ONE" WHEN FLD-A = 1
                           VALUE "TWO" WHEN FLD-A = 2
                           STYLE UNDERLINE WHEN FLD-B = 1.

should be re-coded as:

 
                05  STYLE UNDERLINE WHEN FLD-B = 1.
                  07  COL 1  VALUE "ONE" WHEN FLD-A = 1
                             VALUE "TWO" WHEN FLD-A = 2.

CRW-340-S   xx clause has invalid syntax: ignored.
The given clause is malformed.

CRW-342-S   PRESENT AFTER clause has duplicated phrase: discarded.
One of the options following PRESENT AFTER is repeated.

CRW-343-S   PAGE and JUST not allowed in PRESENT AFTER in PH or PF group.
The clause PRESENT JUST AFTER [NEW] PAGE can appear only in a body group.

CRW-344-I   LAST DETAIL assumed to be xx.
This informational message is issued if LAST DETAIL is not specified and its assumed value is not the same as PAGE LIMIT.

CRW-345-W   LAST BODY GROUP present with FOOTING.
LAST BODY GROUP means the same as FOOTING, so one is superfluous.

CRW-346-S   PAGE option allowed only with TYPE CH.
This refers to the OR PAGE phrase allowed only with a TYPE CH group.

CRW-347-I   LAST BODY GROUP assumed to be xx.
This message appears when no LAST BODY GROUP (or [LAST CONTROL] FOOTING) clause is specified and its value is inferred from the PAGE LIMIT clause and the size of any PAGE FOOTING group.

CRW-348-I   NEXT GROUP syntax inappropriate for this TYPE of group.
This is issued if NEXT DE OR CH GROUP is written in a TYPE DE or CH group or if NEXT BODY GROUP is written in a TYPE CF group, both of which imply a misunderstanding of the operation of the NEXT GROUP clause.

CRW-349-S   COLUMN RIGHT/CENTER must have absolute value: changed to COLUMN PLUS 1.
COLUMN RIGHT and COLUMN CENTER have no relative form.

CRW-350-S   MULTIPLE PAGE not allowed in type PH, PF or CH with OR PAGE.
These three group types must, by definition, be confined to one page and therefore cannot have a MULTIPLE PAGE clause.

CRW-351-S   (NO) MULTIPLE PAGE must have at least 2 subordinate lines.
A single line clearly cannot span two pages, so this clause is permitted only for a group of LINE entries, or a multiple LINES or LINE with OCCURS.

CRW-352-S   Clause "xx" not allowed in unpaged report.
A PAGE clause must be present in the RD if certain clauses, such as GROUP LIMIT are used.

CRW-353-S   GROUP LIMIT too low or too high for this group.
The GROUP LIMIT cannot be less than (that is, positionally higher than) the normal highest (earliest) position for the group, nor greater than (that is, positionally lower than) the normal latest position.

CRW-354-S   GROUP LIMIT allowed only in body group.
GROUP LIMIT cannot be used except with a TYPE CH, DE, or CF group.

CRW-355-E   NO MULTIPLE PAGE can be nested only within MULTIPLE PAGE.
No other nested combinations of these clause are permitted.

CRW-360-E   STYLE not allowed in individual multiple-choice entry.
A STYLE clause cannot be coded between the SOURCE or VALUE clause and the WHEN phrase of a multiple-choice entry.  It can only apply to the complete entry.

CRW-371-E   Condition on STYLE not permitted in FD or RD.
Only an unconditional STYLE clause is allowed for FD or RD entries.  The required effect must be implemented in the report groups.

CRW-377-E   STYLE may need to be on each LINE to take effect in page buffer.
If the PAGE BUFFER feature is in effect, it is inadvisable to code the STYLE clause at a level between RD and LINE.  Take the following construct:

 
                 03  STYLE HIGHLIGHT.
                   05  LINE 1 ...
                   05  LINE 2 ...

The ending control sequence for HIGHLIGHT is not stored until the end of line 2.  If any data is placed on the right of line 1 in the page buffer, it may unintentionally also have the HIGHLIGHT property.  The sample should therefore be re-coded:

 
                 03  LINE 1    STYLE HIGHLIGHT...
                 03  LINE 2    STYLE HIGHLIGHT...

CRW-379-E   TYPE DEFERRED not allowed where record description follows FD.
Since a deferred printer requires a file handler, there cannot be any (01-level) record descriptions following the FD for the file (compare error no. CRW-145-E).

CRW-381-S   WRAP/NO WRAP cannot be duplicated or nested.
The only nesting allowed for this clause is a single NO WRAP nested within a single WRAP.

CRW-382-S   WRAP cannot be used below LINE level.
Only NO WRAP can be used at any level below that of LINE.

CRW-383-E   NO WRAP must be subordinate to WRAP.
Unlike NO MULTIPLE PAGE, NO WRAP cannot be coded independently.

CRW-384-E   NO WRAP must encompass more than one elementary item.
Since an elementary item cannot be split by the WRAP feature, NO WRAP is redundant unless it encloses more than one elementary printable item, or a multiple COLUMNS, or a COLUMN with OCCURS.

CRW-385-S   WRAP COLUMN integer should be between 1 and LINE LIMIT.
The integer following the TO or AFTER phrase clearly must stay within the normal limits for the report.

CRW-870-S   Library member not found.
The name specified in a COPY statement could not be found in SYSLIB or the indicated library.

CRW-871-E   REPLACING phrase has invalid syntax: discarded.
The REPLACING phrase will be ignored and the COPY processed with no replacements.

CRW-872-E   Word "BY" not found: no replacements done.
The end of a token (identifier, literal, pseudo-text, etc.) was reached in a COPY...REPLACING directive and the expected word BY was not found.

CRW-873-E   Too many levels of nesting of COPY.
This message indicates that a COPY statement has been found within the text of another COPY member and the number of levels to which this is permitted has been exceeded.  (See Installation and Operation for details.)

CRW-874-E   Pseudotext invalid or too long: no replacements done.
Either the pseudotext on the left of BY is empty (that is: == ==) or it is longer than the maximum (normally 512 bytes).

CRW-875-W   No items were replaced during COPY.
No match was made against the REPLACING phrase of the COPY statement during the COPY.

CRW-876-E   Invalid COPY syntax: passed to compiler unchanged.
The word COPY is not followed by a word that could be a member-name.

CRW-877-W   Pseudotext brackets assumed as required by REPLACE.
The format of the REPLACE statement requires that each operand should be within pseudotext brackets (== ==).  These were assumed for this REPLACE statement.