94400d50d4
作为子目录纳入系统,与核心测试管道协同 Co-Authored-By: Claude <noreply@anthropic.com>
54 lines
1.8 KiB
Markdown
54 lines
1.8 KiB
Markdown
# 04-edit-getput: Edit/GetPut Pass-Through
|
|
|
|
## 电信业务场景
|
|
|
|
请求书编辑输出。从客户/用量汇总文件读取记录,直接转记到输出文件。用于请求书的最终格式化输出。
|
|
|
|
## Description
|
|
|
|
A minimal COBOL edit/getput program that reads records from FILE-IN and
|
|
writes them unchanged to FILE-OUT. No matching, no branching logic.
|
|
|
|
## Record Layout
|
|
|
|
| Field | Type | Length | Description |
|
|
|----------|----------|--------|--------------------|
|
|
| FIELD1 | PIC X | 10 | Record code |
|
|
| FIELD2 | PIC X | 20 | Description text |
|
|
| FIELD3 | PIC 9 | 05 | Numeric amount |
|
|
|
|
Total record length: 35 bytes.
|
|
|
|
## Files
|
|
|
|
| File | Purpose |
|
|
|------------------|-----------------------------------|
|
|
| main-04-edit-getput.cbl | Main COBOL program (fixed format) |
|
|
| data-gen.sh | Generate sequential test data |
|
|
| run.sh | Compile, run, verify |
|
|
| README.md | This file |
|
|
|
|
## Tests
|
|
|
|
| Test Case | Description |
|
|
|-------------------|------------------------------------------|
|
|
| 1 record (min) | Verify program handles 1 record input |
|
|
| 5 records (std) | Verify standard multi-record processing |
|
|
| Output existence | Confirm FILE-OUT is created |
|
|
| Size match | Input and output file sizes identical |
|
|
| Record length | Each record is exactly 35 bytes |
|
|
|
|
## Usage
|
|
|
|
```bash
|
|
cd 04-edit-getput
|
|
bash data-gen.sh 1 # Generate 1 record (minimal test)
|
|
bash run.sh # Full test with 5 records
|
|
```
|
|
|
|
## Expected Behavior
|
|
|
|
- All input records are written to output unchanged.
|
|
- File status is checked after OPEN, error messages on failure.
|
|
- Record count is displayed at end of processing.
|