feat: add benchmark-programs — 58 telecom COBOL test programs

作为子目录纳入系统,与核心测试管道协同

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
NB-076
2026-06-25 09:53:21 +08:00
parent 50f9f0f52f
commit 94400d50d4
278 changed files with 44125 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
# 11-divide-25 — 25-Division File Splitter
## 电信业务场景
明细25分割。将请求书明细行按25件一个文件进行分割。
Demonstrates dividing input records into groups of 25:
- **PERFORM VARYING counter**: Track record numbers across the loop
- **DIVIDE ... GIVING REMAINDER**: Calculate file number from record count
- **Close-write cycle**: Close old file, open new file at each boundary
- Tested at boundary conditions: 25 (exact), 26 (one extra), 24 (one short)
## Files
| File | Purpose |
|------|---------|
| `main-11-divide-25.cbl` | COBOL program (fixed format) |
| `data-gen.sh` | Generate N test records (default 26) |
| `run.sh` | Compile + run 3 test cases |
## Algorithm
```
DIVIDE record-count BY 25 GIVING Q REMAINDER R
IF R = 1 → open new FILE-OUT-NN
Write record to current file
```
## Output Files
- FILE-OUT-01.DAT: records 1-25
- FILE-OUT-02.DAT: records 26-50
- etc.