Skip to content

equivalence: SQL fault injection (register M2) so SQLCODE error branches are proven #4173

Closed

Description

@squid-protocol

Problem

The equivalence harness never injects SQL failures (register oracle_assumptions.md M2). Error branches that depend on SQLCODE are therefore never exercised, in COBOL or in Java.

Example: GenApp LGACDB01 is proven on 4 scenarios but covers only 6/14 branches (3/4 paragraphs). Its INSERT failure path, MOVE '90' TO CA-RETURN-CODE and PERFORM WRITE-ERROR-MESSAGE, is never reached.

The same gap matters when judging other translations. IBM WCA4Z's published translation of the same paragraph comments that error path out. Our current scenarios would not reach the difference through that path. (A comparison write-up is in docs/research, PR pending.)

Proposal

  • Allow a scenario to declare an SQL fault, e.g. "the Nth INSERT into CUSTOMER returns SQLCODE -803". Apply it on both sides: the COBOL precompiler stub (ggsql) and the Java DetSql/JDBC layer.
  • Fault-inject per statement, the way --faults already works for CICS conditions.
  • Report covered branches before and after on the Db2 cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    era:2scope:core

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions