Find incomplete Db2 duplicate prechecks
ProprietaryFind a scoped COUNT(*) duplicate precheck that omits equality predicates required by an explicit application contract. Resolve the complete applicable key from the selected repository-visible DDL declaration. Require ordinary resolved hosts and a complete supported SELECT grammar. Unknown SQL, hosts or key declarations remain unresolved. Predicate presence does not prove matching INSERT values or correct SQLCODE handling. Do not add predicates, replace database uniqueness enforcement or invent duplicate handling.
io. moderne. mainframe. security. FindIncompleteDb2DuplicatePrechecksRequired
Exact repository-relative COBOL source path covered by the approved precheck contract. Globs are not supported.
Program ID covered by the contract. Retain quotes for literal IDs. Their contents match case exactly.
Exact unquoted schema and table name. The contract must identify this table and the selected DDL key as applicable to the precheck.
Exact outermost-first dotted COBOL declaration. The contract must identify every SELECT COUNT(*) into this field for the scoped table as a duplicate precheck that requires every selected key column.
Exact repository-relative DDL or JCL source containing the applicable key declaration. This source must be present in the recipe run.
One-based key declaration order within the selected source. Use AnalyzeDb2UniqueKeys to inspect it. The contract must approve this specific declaration.
Provenance of the approved precheck identity, applicable key and required predicates. Recorded as evidence. The contract is not fetched.
mod run . --recipe= io. moderne. mainframe. security. FindIncompleteDb2DuplicatePrechecks \
-P sourcePath= security/ cbl/ VSPCKBAD. cbl \
-P programName= VSPCKBAD \
-P protectedTable= VTEST. VERSIONED_ITEM \
-P countField= VS-COUNT \
-P keySource= security/ ddl/ VSVER. ddl \
-P keyDeclarationOrdinal=1 \
-P contractSource= 'mainframe-fixtures/ README. md fictional duplicate-precheck contract'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.