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
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
* ==== TYPE: ST-READ-AT-END ====
|
||||
* FEATURE: READ with AT END / NOT AT END
|
||||
* STATEMENT: READ AT END
|
||||
* BRANCHES: 0, DECISIONS: 0
|
||||
* NOTE: READ AT END is pass-through; no IF
|
||||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. READAE.
|
||||
ENVIRONMENT DIVISION.
|
||||
INPUT-OUTPUT SECTION.
|
||||
FILE-CONTROL.
|
||||
SELECT IN-FILE ASSIGN TO 'INDATA.DAT'.
|
||||
DATA DIVISION.
|
||||
FILE SECTION.
|
||||
FD IN-FILE.
|
||||
01 IN-REC PIC X(80).
|
||||
WORKING-STORAGE SECTION.
|
||||
01 WS-STATUS PIC X VALUE 'N'.
|
||||
01 WS-DATA PIC X(80).
|
||||
PROCEDURE DIVISION.
|
||||
MAIN.
|
||||
OPEN INPUT IN-FILE.
|
||||
READ IN-FILE INTO WS-DATA
|
||||
AT END MOVE 'Y' TO WS-STATUS
|
||||
NOT AT END MOVE 'N' TO WS-STATUS.
|
||||
IF WS-STATUS = 'Y'
|
||||
DISPLAY 'OK: AT END REACHED'
|
||||
ELSE
|
||||
DISPLAY 'OK: DATA READ'.
|
||||
CLOSE IN-FILE.
|
||||
STOP RUN.
|
||||
Reference in New Issue
Block a user