Skip to content

Allow Clause

This clause enables you to select whether the ANS-68 or the ANS-85 standard rules should be used for the formation of totals.

allow clause

Allow Clause: Coding Rules

The COBOL-IT Report Writer software, as supplied, assumes:

ALLOW SOURCE NO SUM CORR because of the setting of the OSVS precompiler option . This default may be altered permanently by customization, or temporarily by changing the setting of the OSVS option in the JCL. You will need to code this clause only if you need to override the normal default, or if your program is to be portable and it is important to document which standard you are assuming.

Allow Clause: Operation

ALLOW SOURCE SUM CORR causes SOURCE SUM correlation to take effect throughout the report. The correlation between SOURCE items in a DETAIL and SUM clauses in a CONTROL FOOTING group is the main distinguishing feature of the ANS-68 standard. It is the only important case where the same code may give different results under the '68 and the '85 standards. OS/VS and DOS/VS COBOL's built-in Report Writer uses the ANS-68 standard, and this is why the supplied version has the option OSVS set on, implying SOURCE SUM correlation. It will be important for you to understand the effect of SOURCE SUM correlation if your report has:

  • more than one DETAIL group, and

  • a SUM clause referring to a data item that is defined in as section of you DATA DIVISION (other than the REPORT SECTION)

For full details, see SUM clause.

If you code the word NO the effect is reversed.

Compatibility

The ALLOW clause is provided by new Report Writer only. OS/VS and DOS/VS COBOL always act as though ALLOW SOURCE SUM CORR were assumed.

Back to top