cobc refuses a multiple COLUMN clause in a report group as soon as one of its operands is relative (PLUS n or + n). A single COLUMN PLUS n and an all-absolute list such as COLUMNS 1 5 are accepted.
col1.cob (attached, free format):
IDENTIFICATION DIVISION.
PROGRAM-ID. COL1.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT RPTF ASSIGN TO "col1.out".
DATA DIVISION.
FILE SECTION.
FD RPTF REPORT IS R1.
REPORT SECTION.
RD R1 PAGE LIMIT 10.
01 D1 TYPE DETAIL LINE 1.
05 COLUMNS ARE 1 PLUS 4 PIC X(2) VALUE "AB".
05 COLUMN 20 PIC X VALUE "Z".
PROCEDURE DIVISION.
OPEN OUTPUT RPTF
INITIATE R1
GENERATE D1
TERMINATE R1
CLOSE RPTF
DISPLAY "DONE"
STOP RUN.
cobc -x -free -std=cobol2014 -o col1 col1.cob
3.2.0 and 3.3-dev r5751 both stop with (source excerpts omitted)
col1.cob:13: error: syntax error, unexpected PLUS, expecting DISPLAY or DISPLAY-1 or NATIONAL or UTF-8
col2.cob, attached, gets the same error for COLUMNS PLUS 2 PLUS 4, "unexpected Literal" for COLS PLUS 2 9 and "unexpected +" for COLUMNS 1 + 4 10; -std=default, cobol2002, ibm and mf give the same.
The program should print DONE and write AB AB Z: AB in columns 1-2 and 6-7 (2 + 4), Z in column 20. Each operand of the COLUMN clause is integer-1 or PLUS integer-2, and the ellipsis repeats that choice (ISO/IEC 1989:2023 13.18.14.2); 13.18.14.3 syntax rule 10: "If more than one integer-1 or integer-2 operand is specified the clause is referred to as a multiple COLUMN clause". General rule 8 of 13.18.14.4 starts a relative item integer-2 columns after the end of the item before it. Syntax rules 9 and 10 and general rules 8 and 12 read the same in 2002 and in the 2014 FCD.
In cobc/parser.y, col_or_plus is either plus integer_or_zero (one relative operand) or column_integer_list (absolute operands only), so no list can hold a relative operand.
The attached patch (against 3.3-dev r5751) makes col_or_plus a list of column_integer or new column_plus operands. A relative operand goes into report_column_list, and a new resolve_report_column_list in codegen.c resolves it once the item's column is known. validate_field_1 (field.c) clears the step_count that a leading PLUS on a line's first field sets, which would push the next item right. column_clause reports "PLUS is not allowed with LEFT, RIGHT or CENTER" for a relative operand of a multiple COLUMN clause (syntax rule 9); a single COLUMN RIGHT PLUS 4 on a line's first field still only warns (unchanged by the patch, although syntax rule 9 forbids it too).
With the patch col1 writes AB AB Z and col2 writes
< CD CD Z
< EF EF Z
GH GH GH Z
It adds a test each to syn_reportwriter.at and run_reportwriter.at, and ChangeLog entries. The generated C of the existing report writer tests and the NIST RW results are unchanged. make check: 1374 expected, 9 skipped, 0 failed (1372 unpatched); the new tests fail without the patch.
col1 ends its line with COLUMN 20 because cobc sizes the report record from the items' storage, where a multiple COLUMN item's repetitions sit side by side after its first column (finalize_report in tree.c counts only the first repetition's columns): COLUMNS 1 5 alone gets a 4-byte record and writes AB. LINE sits on its own entry because 05 LINE 1 COLUMNS 2 8 fails in the C compile with 'rf_4' undeclared. The patch leaves both alone; they happen with absolute operands too.
None found (searched bugs through #1285, feature-requests through #525, patches through #122).
GnuCOBOL 3.2.0 (Ubuntu gnucobol3 3.2-4build1) and 3.3-dev r5751 (CI snapshot 3.3-dev.138 of 2026-10-29), x86_64 Linux, both run 2026-11-04.