Files
cobol-java-v3/test-data/cobol/category_matching/MT01_1TO1.cbl
T
hangshuo652 bc1d56d1a4 feat: Phase 2 complete — 13 Phases of COBOL type classification and test benchmark
P0.6: gcov infrastructure
P1: extract_structure output expansion (11 new feature fields)
P2: Confusion group rule engine (8 pairs + contradiction + backtrack)
P3: 4-factor confidence calculation + quality gate update
P4: 33+2 COBOL program type test samples (22 files, 7 categories)
P5: parametrized/ test data generation engine
P6: japanese_data.py lookup tables
P7-10: Type-specific test suites (~159 parametrized tests)
P11: Full classification pipeline (classify_program) + orchestrator integration
P12: Documentation (module-interfaces, test-plan v3.0, coverage-matrix)

Architecture decisions:
- classification_pipeline/ merged to hina/pipeline/
- parametrized/ as independent module
- japanese_data.py as root-level file
- hina/__all__ only exports classify_program()

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-19 23:51:55 +08:00

44 lines
1.5 KiB
COBOL

* ==== TYPE: MT01 MATCHING(1:1) ====
* FEATURE: 2 input files, IF KEY = compare, 3-way IF
* BRANCHES: 4, DECISIONS: 2
IDENTIFICATION DIVISION.
PROGRAM-ID. MT01.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT FILE-A ASSIGN TO 'FILEA.DAT'.
SELECT FILE-B ASSIGN TO 'FILEB.DAT'.
DATA DIVISION.
FILE SECTION.
FD FILE-A.
01 REC-A PIC X(80).
FD FILE-B.
01 REC-B PIC X(80).
WORKING-STORAGE SECTION.
01 WS-KEY-A PIC X(10).
01 WS-KEY-B PIC X(10).
01 WS-EOF-A PIC X VALUE 'N'.
01 WS-EOF-B PIC X VALUE 'N'.
PROCEDURE DIVISION.
MAIN-PROCEDURE.
OPEN INPUT FILE-A FILE-B.
READ FILE-A INTO REC-A
AT END MOVE 'Y' TO WS-EOF-A.
READ FILE-B INTO REC-B
AT END MOVE 'Y' TO WS-EOF-B.
PERFORM UNTIL WS-EOF-A = 'Y' OR WS-EOF-B = 'Y'
IF WS-KEY-A = WS-KEY-B
DISPLAY 'MATCH: ' REC-A(1:50)
READ FILE-A AT END MOVE 'Y' TO WS-EOF-A
READ FILE-B AT END MOVE 'Y' TO WS-EOF-B
ELSE IF WS-KEY-A < WS-KEY-B
DISPLAY 'UNMATCH-A: ' REC-A(1:50)
READ FILE-A AT END MOVE 'Y' TO WS-EOF-A
ELSE
DISPLAY 'UNMATCH-B: ' REC-B(1:50)
READ FILE-B AT END MOVE 'Y' TO WS-EOF-B
END-IF
END-PERFORM.
CLOSE FILE-A FILE-B.
STOP RUN.