Skip to content

Appendix A: List of Post-1968 Extensions

This section lists the extensions to the ANSI 1968 COBOL-IT Report Writer standard that are included in COBOL-IT 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-IT Report Writer is thus an optimal merging or best of all worlds from the three standards.

Items marked in this way are recent additions, new to this release.

File and Control Section

MODE clause to enable processing by an Independent Report FileHandler.

PAGE BUFFER clause to allow each page to be held in memory inorder to set up an irregular format.

RANDOM PAGE clause to allow the page's current line and columnto be repositioned like a "cursor".

DUPLICATED clause to reduce coding when program has more thanone report with a similar layout.

(ANS-68) Report file FD may be followed by a record descriptionand may be written to independently.

(ANS-85) FD for report file may have a GLOBAL clause and/or anEXTERNAL clause.

FIRST PAGE NO ADVANCING clause, preventing initial pageadvance.

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 PAGELIMIT 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 spellingsfor LAST DETAIL.

LAST CF / CONTROL FOOTING / BODY GROUP alternative spellings forFOOTING.

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 SOURCESUM 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 whenDETAIL generated with 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, atCONTROL 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 beaccessed 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-COUNTERin the REPORT SECTION is the current report.

The default qualifier for PAGE-COUNTER and LINE-COUNTER in a USEBEFORE 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 afterpage 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.

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. (Legacycompilers do not diagnose this but the code fails in consequence.)

(IBM) Same absolute LINE number may be repeated with eachCOLUMN.

Column Clause

COLUMN may be shortened to COL.

COLUMN alone means COLUMN + 1.

COLUMN + 1 assumed by default for any elementary item beneathLINE 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 asidentifiers.

(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-alphabeticliteral.

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 asmore general alternative to GROUP INDICATE.

Multiple-choice [PRESENT] WHEN entry to select one from a set ofSOURCE / VALUE terms.

Special condition CONTROL IS control-id for use with PRESENT WHENand multiple CF group.

OCCURS for repetition with 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 forspecial-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 PageBuffer.

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 TOPRINT-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, fordirecting report writer output to a special device or to user's ownde-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 7levels, 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-IT Report Writer. They are therefore listed here in some detail:

  • Inline Comments

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

    inline comments

  • Wildcards 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:

    wild card

    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-IT 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.

Back to top