Repository navigation
Description
Problem
In fixed-format source with numbered sequence areas (ISPF NUMBER ON STD, the norm for members pulled from a PDS), a verb whose operand starts on the next line records the next line's sequence number as the operand:
| statement | channel | engine records | should be |
|---|---|---|---|
PERFORM / INIT-PARA |
function_data.calls_out_to | 000900 |
INIT-PARA |
GO TO / END-PARA. |
function_data.transfers_to | 001000 |
END-PARA |
CALL / 'SUBPGM1' |
calls_out_to / call_site_data | 001100 / no row at all |
literal SUBPGM1 |
CALL / WS-PGM |
calls_out_to / call_site_data | 001300 / no row |
identifier WS-PGM |
COPY / CPYA. |
file_data.raw_imports / edge_data | ["000600"], no import edge |
CPYA, edge to CPYA.cpy |
Cause: the readers run on a stream where cols 73-80 are (after #4290) blanked but cols 1-6 are not, and their operand separators cross \n (cobol.py calls_out \s+, _transfers_out \s+, _dependency_capture [ \t\n]+), so the separator swallows the newline and the next token is the sequence number. mainframe_boundary._CALL_LITERAL / _CALL_IDENTIFIER need a letter or quote, so they match nothing and the CALL site is silently dropped.
Evidence
- Minimal repro (main 737cab8 and PR Fix #4264: fixed / free COBOL reference format, per file and per directive #4290 head 00768a1, identical):
REPRO4.cbl/REPRO5.cbl(below). Shape:->000800 PERFORM 000900 INIT-PARA 001000 CALL 001100 'SUBPGM1'MAIN-PARA.calls_out_to = ["000900", "001100", "001300"],call_site_dataempty. - Crucible (language-crucible v1.7.0), NIST CCVS85. Fix #4264: fixed / free COBOL reference format, per file and per directive #4290 turns one wrong value into another here:
NC1344.2.cbl:376-377... ELSE GO TO/038000 TST-21.-> transfers_toNC1344on main (cols 73-80, COBOL engine: >>SOURCE FORMAT directives and per-file fixed/free detection with column-72 handling #4264),038000on Fix #4264: fixed / free COBOL reference format, per file and per directive #4290. Same at :425, :464, :513, :526, :694 (6 sites).DB1024.2.cbl:638-639PERFORM/064000D PASS.-> calls_out_toDB1024on main,064000Dand064200on Fix #4264: fixed / free COBOL reference format, per file and per directive #4290;DB1034.2.cbl:636likewise.
Impact on a real estate
Split operands are a minority shape, but sequence numbers are on nearly every legacy member. Each hit gives a phantom callee or GO TO target, a lost CALL edge (call graph, unresolved-call report) or a lost COPY edge (copybook dependency, popularity -> possible zero-density relegation of the copybook).
Acceptance criteria
- Sequence area (cols 1-6) of fixed lines is blank in the stream the calls_out / _transfers_out / _dependency_capture rules and the mainframe_boundary CALL readers see (or the separators skip it)
- Repro: split PERFORM, GO TO, CALL literal, CALL identifier and COPY each read the real operand; split CALL produces a call_site_data row
- NIST NC1344.2 / DB1024.2 / DB1034.2 targets become TST-21 / PASS / FAIL
Found during: crucible mainframe count audit (2026-10-04)
Reproducer
REPRO4.cbl
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. REPRO4.
000300 DATA DIVISION.
000400 WORKING-STORAGE SECTION.
000500 01 WS-PGM PIC X(8) VALUE 'SUBPGM2'.
000600 PROCEDURE DIVISION.
000700 MAIN-PARA.
000800 PERFORM
000900 INIT-PARA
001000 CALL
001100 'SUBPGM1'
001200 CALL
001300 WS-PGM
001400 STOP RUN.
001500 INIT-PARA.
001600 DISPLAY 'I'.REPRO5.cbl
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. REPRO5.
000300 DATA DIVISION.
000400 WORKING-STORAGE SECTION.
000500 COPY
000600 CPYA.
000700 PROCEDURE DIVISION.
000800 MAIN-PARA.
000900 IF CPYA-FLAG = 'Y' GO TO
001000 END-PARA.
001100 STOP RUN.
001200 END-PARA.
001300 STOP RUN.Found by a grep-vs-engine count audit of every mainframe file in language-crucible v1.7.0 (802 of 815 files compared), on main 737cab8 and the #4290 head (now merged as c136f46).
Activity
COBOL: blank the numbered sequence area so split operands read the re…
Answer keys: score unit extents and intra-program PERFORM / GO TO edg…
Ground-truth ledger: ratchet out 182 unit-extent entries #4334 fixed (#…
COBOL record_data: keep the OCCURS DEPENDING ON object's qualifiers (#…
fix: train -- #4329, #4391, #4392, #4393 (#4398)
PL/I: widen the DSF answer key to 150 files; blind-review it and thre…