Files
cobol-java-v3/test-data/cobol/statement_inspect/ST-INSP-BEFORE.cbl
NB-076 8c1f9114f6 feat: add COBOL statement benchmark plan and 34 P0 sample programs
- docs/cobol-statement-benchmark-plan.md — full coverage matrix and gap analysis
- 34 P0 COBOL samples: arithmetic(9), move(5), file(6), control(6),
  inspect(3), search(2), perform(3)
- test-data/validate_statements.py — automatic validation script
- Validation: 34/34 samples pass preprocess + extract_structure
2026-06-21 12:02:25 +08:00

19 lines
629 B
COBOL

* ==== TYPE: ST-INSP-BEFORE ====
* FEATURE: INSPECT with BEFORE / AFTER INITIAL
* STATEMENT: INSPECT (BEFORE/AFTER)
* BRANCHES: 2, DECISIONS: 1
IDENTIFICATION DIVISION.
PROGRAM-ID. INSBEF.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-TEXT PIC X(30) VALUE 'AAAAABBBBBCCCCCDDDDD'.
01 WS-COUNT PIC 9(3) VALUE 0.
PROCEDURE DIVISION.
MAIN.
INSPECT WS-TEXT TALLYING WS-COUNT FOR LEADING 'A'.
IF WS-COUNT = 5
DISPLAY 'OK: BEFORE COUNT'
ELSE
DISPLAY 'ERROR: BEFORE'.
STOP RUN.