94400d50d4
作为子目录纳入系统,与核心测试管道协同 Co-Authored-By: Claude <noreply@anthropic.com>
870 B
870 B
23-select-condition — SELECT Condition Simulation
电信业务场景
客户合同检索。使用索引文件模拟SELECT条件检索,通过START+READ NEXT实现条件匹配和范围查询。
Purpose
Simulates SQL SELECT with WHERE conditions using GnuCOBOL INDEXED files and START/READ NEXT operations.
Test Coverage
- Single record by key — READ with KEY IS (exact match WHERE)
- Range query — START with NOT LESS THAN, loop with upper bound check
- Zero results — Key not found, INVALID KEY handling
- Greater-than query — START with GREATER THAN, read all following records
Key Techniques
- INDEXED file ORGANIZATION with DYNAMIC access
- START for positioning (KEY IS GREATER THAN / NOT LESS THAN)
- READ NEXT for sequential traversal
- FILE STATUS checking
- INVALID KEY / NOT INVALID KEY for conditional handling