Some violations are missing for this QR. The SourceCode contains SQL QUERY that access to Database without using the first field of the index as shown in following screenshot.
The SQL QUERY is into 2100-XXX. COBOL PARAGRAPH is the following:
EXEC SQL
SELECT ZP_REF_IPRD
INTO :VNJ09301-ZP-REF-IPRD
FROM VNJ09301_IPRDOPCR
WHERE Z_FIM_VLDE_IPRD = :VNJ09301-Z-FIM-VLDE-IPRD
ORDER BY ZP_REF_IPRD DESC
FETCH FIRST ROW ONLY
END-EXEC.
With the following indexes defined on the table:
CREATE INDEX PGOWNDB.INJ09301 UNIQUE ON PGOWNDB.TNJ00093_IPRDOPCR (
Z_PRCT_REG_IPRD ASC
, ZP_REF_IPRD ASC
, N_CTTO_CRED ASC
, C_PAIS_ISOA_CTTO ASC
, C_MNEM_EGC_CTTO ASC ) CLUSTER
CREATE INDEX PGOWNDB.INJ09302 UNIQUE ON PGOWNDB.TNJ00093_IPRDOPCR (
ZP_REF_IPRD ASC
, N_CTTO_CRED ASC
, Z_FIM_VLDE_IPRD ASC )
CREATE INDEX PGOWNDB.INJ09303 UNIQUE ON PGOWNDB.TNJ00093_IPRDOPCR (
ZP_REF_IPRD ASC
, Z_FIM_VLDE_IPRD ASC , N_CLIENTE ASC
, NS_ABRA_CLI ASC )
You can see the the paragraph is using the Z_FIM_VLDE_IPRD column in its where clause that is not the first column in any of the given indexes. However, no violation is found :
Release | Yes/No |
---|---|
8.3.x |
RDBMS | Yes/No |
---|---|
CSS |
From the screenshot above, the cobol paragraph and program are accessing a view that is using a table that is having an index (the programs/paragraphs are not accessing the table directly).
This is not detected as a violation in the current functional of the quality rule.
Hence, it is the current expected behavior of the product to not raise a violation in this case.