# 30-keybreak-other — Key Break Non-Summary Change Detector ## 电信业务场景 通话状态变化检测。对已排序的通话状态记录进行key切变化检测,当通话状态(待接听/通话中/已结束)发生变化时输出标记行。 Detects key changes without aggregation: - Compare WS-PREV-KEY to detect key changes in sorted input - On key change: write "*** KEY CHANGE TO: ***" marker line - No aggregation — every data record is written to output unchanged - First record always starts with a marker line ## Files | File | Purpose | |------|---------| | `main-30-keybreak-other.cbl` | COBOL program (fixed format) | | `data-gen.sh` | Generate sorted test data (4 groups) | | `run.sh` | Compile, run, display output | ## Input Record | Field | Type | Length | |-------|------|--------| | KEY | PIC X | 10 | | DATA | PIC X | 30 | ## Output Data records written as-is, with marker lines inserted before each new key group. Single-record groups produce a marker followed immediately by the data record.