Skip to content

Line Limit Clause

This clause indicates the maximum number of columns likely to be required for the longest line of your report. It enables report writer to check that all of your report fields appear within the limits of the report line, and to warn you if there is any danger of data being lost beyond the right-hand extremity of the lines.

line limit clause

Line Limit Clause: Coding Rules

  • The value coded gives the maximum line width, in other words the greatest number of print columns required for your report. You may simply enter the column width of your printer, for example: LINE LIMIT IS 132 or, if your report is clearly designed to take up less than this number of columns, use that value instead. Do not allow for the carriage control character.

  • The identifier form of the clause is used if you wish the width of your report line to assume different values at different times. This form of the clause takes effect only when you use either the REPEATED clause, or the WRAP clause (see 3.28). The identifier must be an unedited numeric field.

  • If the FD entry for the corresponding report file contains a BLOCK or RECORD CONTAINS integer CHARACTERS clause (other than BLOCK CONTAINS 0 CHARACTERS), the value of integer, after allowing for the carriage control character (if the NOADV option is in effect), and the size of any CODE field, must not be less the LINE LIMIT, or its default value (see item 3 in the section below).

Line Limit Clause: Operation

  • If any report field extends beyond the maximum line width given in your LINE LIMIT clause, report writer will signal a fault, either at compile time or, if that is not foreseeable, at run time.

  • If you use the identifier form of the clause, report writer evaluates its contents dynamically at INITIATE time and uses that as the value for the clause. For the purpose of checking the validity of COLUMN numbers, it will use the default maximum value described below. The value set up by the identifier is used at run time for the following purposes:

    • to vary the number of REPEATED groups that may be placed side-by-side (see REPEATED clause)

    • as one means of adjusting the right margin when the WRAP clause is used to produce line wrap round (see WRAP clause)

    • to check for (illegal) line overflow in variable-position report fields when the WRAP clause is not used.

  • If you omit the LINE LIMIT clause, report writer will assume a default value of the maximum line width. This is set to 256 in the report writer software as supplied but this default may be changed by customization to any lesser value (see Installation and Operation).

  • The LINE LIMIT need not be the same as logical record length of the report file. The latter is established from the computed maximum length of the lines of the report, or from the RECORD or BLOCK CONTAINS clauses if present (see FILE-CONTROL and FD: Operation).

  • An internal special register with the reserved name LINE-LIMIT is established in the Report Control Area, containing the value specified in the LINE LIMIT clause, or its default value.

Compatibility

The LINE LIMIT clause is unique to new Report Writer. OS/VS and DOS/VS COBOL do not perform checks on the feasibility of COLUMN numbers.

Back to top