|
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 sho |