94400d50d4
作为子目录纳入系统,与核心测试管道协同 Co-Authored-By: Claude <noreply@anthropic.com>
906 B
906 B
09-db-update — Database Update Simulation
电信业务场景
客户信息DB更新。使用索引文件模拟关系数据库,实现客户信息的INSERT、UPDATE、DELETE操作。
Purpose
Simulates DB update operations (INSERT, UPDATE, DELETE) using GnuCOBOL INDEXED files as a stand-in for EXEC SQL.
Test Coverage
- INSERT 3 records — WRITE to indexed file with STATUS check
- Duplicate INSERT — Attempt key duplicate, expect STATUS 22
- UPDATE — READ then REWRITE to modify an existing record
- DELETE — READ then DELETE to remove a record
- Verify — START + READ NEXT to read back remaining records
- Report — Summary output to report.txt
Key Techniques
- INDEXED file with DYNAMIC access
- FILE STATUS checking (00=OK, 22=dup, 23=not found, 10=EOF)
- WRITE / REWRITE / DELETE with INVALID KEY
- START + READ NEXT for sequential traversal