feat: add benchmark-programs — 58 telecom COBOL test programs
作为子目录纳入系统,与核心测试管道协同 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# 08-keybreak-aggregate — Key Break Aggregate
|
||||
|
||||
## 电信业务场景
|
||||
|
||||
套餐统计。按套餐代码进行key切聚合,计算各套餐的合同数、最大/最小金额、总量等统计信息。
|
||||
|
||||
Demonstrates key break processing with four statistical aggregates:
|
||||
|
||||
- **COUNT**: Number of records in each key group
|
||||
- **MIN**: Minimum VALUE in each group
|
||||
- **MAX**: Maximum VALUE in each group
|
||||
- **TOTAL**: Sum of VALUE in each group
|
||||
|
||||
Same control-break logic as 07-keybreak-summary, extended with
|
||||
min/max tracking using IF comparisons.
|
||||
|
||||
## Files
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `main-08-keybreak-aggregate.cbl` | COBOL program (fixed format) |
|
||||
| `data-gen.sh` | Generate sorted test data |
|
||||
| `run.sh` | Compile, run, verify output |
|
||||
|
||||
## Input Record
|
||||
|
||||
| Field | Type | Length |
|
||||
|-------|------|--------|
|
||||
| KEY | PIC X | 10 |
|
||||
| VALUE | PIC 9 | 10 |
|
||||
|
||||
## Output Record
|
||||
|
||||
| Field | Type |
|
||||
|-------|------|
|
||||
| KEY | PIC X(10) |
|
||||
| COUNT | PIC Z(5)9 |
|
||||
| MIN | PIC Z(9)9 |
|
||||
| MAX | PIC Z(9)9 |
|
||||
| TOTAL | PIC Z(9)9 |
|
||||
Reference in New Issue
Block a user