Files
cobol-java-v3/benchmark-programs/30-keybreak-other/README.md
T
NB-076 94400d50d4 feat: add benchmark-programs — 58 telecom COBOL test programs
作为子目录纳入系统,与核心测试管道协同

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-25 09:53:21 +08:00

34 lines
1.0 KiB
Markdown

# 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: <KEY> ***" 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.