Previous Topic: Scan Processing

Next Topic: Process Scan Results

Display the Generated Scan Action Table

The &NDBCTL statement provides an operand that lets you obtain a display of the generated scan action table, both before the scan is processed, and after. This scan debug information can be quite useful for determining why a scan request does not return the expected records.

To obtain this display, code the following statement prior to the &NDBSCAN request:

&NDBCTL SCANDEBUG=YES
&NDBCTL MSG=YES or MSG=LOG must be in effect, otherwise no messages are returned.

The first part of the displayed table represents the parsed scan request. Each relation in the request, for example, X = Y, generates a line in the table. All generic or range field names are expanded to the full list, and actions to combine previous results, using AND, OR, or NOT, are shown. The text of the &NDBSCAN request is also displayed.

The second part of the table, produced after the scan completes, shows how many records passed each phase, and whether a scan of the actual data was required.