Repository navigation
Det Db2: a SQLCA declared COMP is held big-endian, so EVALUATE SQLCODE WHEN 100 matches (Part of #8121) - #8225
Conversation
…E WHEN 100 matches (Part of #8121) example-health-apis ships IBM's SQLCA.cpy (SQLCODE PIC S9(9) COMP), found before the COMP-5 stand-in. DetSql wrote every SQLCA field little-endian, so +100 read back as 1677721600 and took the OTHER arm. The translator now registers a COMP SQLCA (DetSql.sqlcaBigEndian), putInt writes it big-endian and the WHENEVER read follows the declaration. COMP-5 SQLCA ports emit nothing new. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…8121) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push. |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
CI shepherd: the head of this PR (707de61) is not the one a maintainer labelled |
|
No description provided. |
1 similar comment
|
No description provided. |
|
No description provided. |
1 similar comment
|
No description provided. |
…rt of #8121) (#8229) Case data only: health-hcmapl01 (11 scenarios, Db2 faults), its sweep coverage ledger, a duration entry and a dated estate-journey note. The patient-lookup arm proves only with the Java SQLCODE +100 fix (#8225). Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Part of #8121
What
A det port whose SQLCA is declared COMP took the Other arm of
EVALUATE SQLCODE WHEN 100after a no-row SELECT (or an injected +100). Cause: example-health-apis ships IBM'sSQLCA.cpywithSQLCODE PIC S9(9) COMP, found before the COMP-5 stand-in;DetSql.putIntwrote every SQLCA field little-endian, so +100 read back big-endian as 1677721600. SQLCODE 0 is the same bytes either way, andNOT = 0,< 0and WHENEVER passed by accident: only an exact= 100/= -811comparison missed.Fix (engine, no case data):
program.pyemitsDetSql.sqlcaBigEndian(s_SQLCA)only when the SQLCA's SQLCODE is not COMP-5;DetSql.putInt(every SQLCA writer goes through it) writes that storage big-endian;sql.py_whenever_testsreads SQLCODE big-endian for it. COMP-5 SQLCA ports emit no new text.Evidence
selectOne: unregistered SQLCA reads 1677721600 (the bug), registered reads 100.tests/cobol_mainframe/test_det_sqlca_comp.py: registration emitted for SELECT / FETCH / UPDATE / DELETE over a COMP SQLCA and absent for the COMP-5 stand-in; the WHENEVER read follows the declaration; putInt source pin.test_sql_whenever,test_sql_faults,test_det_zos_comp5,test_sql_unit_of_work,test_evidence_components: pass.audit_check.py: clear.ruff format --check: clean.det_port.py check/ golden bless (the translator output for COMP-5 SQLCAs is unchanged; every Db2 port's copiedDetSql.javamoves by this edit, as any runtime edit does).Class sweep
Every SQLCA field write shares
putInt: SQLCODE +100 from selectOne, injected faults, FETCH end of cursor, rowset FETCH, searched UPDATE/DELETE, INSERT...SELECT, -811, and SQLERRD / SQLERRML. Only the translation-level and WHENEVER paths are pinned by the tests; the runtime paths are covered by the sharedputInt.Sibling gaps
File-cap exception: one fix needs the runtime, the translator emission, the WHENEVER read and a one-line
gen.pyattribute default together; the blocker page is generated from the ledger.Remaining slices
HCIVDB01, HCV1BI01, HCV1PL01 and the rest of the Inquire family case data (now unblocked at (a)); P124 blocker (b).
Checklist: partial [c:54bc7fde] -- Inquire family case data still to ship
Checklist: partial [c:581bd365] -- scenarios for HCIVDB01 / HCV1BI01 not yet shipped
Lessons for agents
det/copy/SQLCA.cpy) is written by DetSql in the COMP-5 order unless registered; an= 100comparison is the only SQLCODE test that shows it.🤖 Generated with Claude Code