Files
cobol-java-v3/test-data/cobol/statement_move/ST-UNSTRING-BASIC.cbl
T
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

24 lines
780 B
COBOL

* ==== TYPE: ST-UNSTRING-BASIC ====
* FEATURE: UNSTRING space-delimited into multiple fields
* STATEMENT: UNSTRING
* BRANCHES: 0, DECISIONS: 0
* NOTE: UNSTRING is pass-through; no IF
IDENTIFICATION DIVISION.
PROGRAM-ID. UNSBAS.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-SRC PIC X(20) VALUE 'ABC DEF GHI'.
01 WS-A PIC X(5).
01 WS-B PIC X(5).
01 WS-C PIC X(5).
PROCEDURE DIVISION.
MAIN.
MOVE SPACES TO WS-A WS-B WS-C.
UNSTRING WS-SRC DELIMITED BY SPACES
INTO WS-A WS-B WS-C.
IF WS-A = 'ABC'
DISPLAY 'OK: UNSTRING'
ELSE
DISPLAY 'ERROR: UNSTRING'.
STOP RUN.