Fine tune SQLCODE data collection

The MAX_SQLCODES and MAX_SQLCODE_DETAIL parameters control the summary data collection for SQLCODEs. The summary data is accessed using the View SQLCODEs option in the ISPF Client and the SQLCODES perspective in the CAE Browser Client.

The MAX_SQLCODES parameter sets the limit on the number of unique SQLCODES for which summary information is collected. The MAX_SQLCODE_DETAIL sets the limit on the number of detail records which is collected for each occurrence of an SQLCODE.

Note: The detail that is collected is very limited and consists of the SQLCA and the text of the SQL statement, if the statement text is available. No performance data or host variable information is available in this feature of Db2 Query Monitor. Host variables and performance metrics for statements which end with negative SQLCODES are kept with the exception record for the event.

A recommended starting value for MAX_SQLCODES is 250. This will most likely be larger than the number of distinct SQLCODES in a given interval. A recommended starting value for MAX_SQLCODE_DETAIL is between 50 and 100. This will normally allow a Db2 Query Monitor user to determine which SQLCODES are being used as coding techniques by which programs. When the codes being used as coding techniques are identified, they can be excluded from exception and alert processing in the monitoring profile.