Analyze Query (ANZQRY)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Analyze Query (ANZQRY) command allows you to analyze a query definition (QRYDFN) object for query management conversion problems. Output from this command includes diagnostic messages about potential differences between Query/400 and query management use of query and form information derived from the analyzed QRYDFN object. A completion message shows the highest severity of potential problems found.

Top

Parameters

Keyword Description Choices Notes
QRY Query Qualified object name Required, Positional 1
Qualifier 1: Query Name
Qualifier 2: Library Name, *LIBL, *CURLIB
SEV Severity code filter 0-99, 0 Optional, Positional 2
Top

Query (QRY)

Specifies the query definition (QRYDFN) to be analyzed.

This is a required parameter.

Qualifier 1: Query

name
Specify the name of the QRYDFN to be analyzed.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
name
Specify the name of the library to be searched.
Top

Severity code filter (SEV)

Specifies the severity code of the message. The severity code indicates the severity level of the condition that causes the message to be sent.

0
All diagnostic messages about differences are logged.
0-99
Specify a severity code filter.
Top

Examples

Example 1: Displaying All Messages

ANZQRY   QRY(QRY2)

This command analyzes the first QRYDFN named QRY2 in the user's library list. Messages about conversion problems, for example, text that is too long, are sent to the job log. The messages are displayed when the analysis has completed.

Example 2: Displaying Specific Messages

ANZQRY   QRY(QRY2)  SEV(99)

This command analyzes the first query named QRY2 in the user's library list. Only the completion message and messages diagnosing conditions which need to be investigated before a run is attempted are shown and logged.

Top

Error messages

None

Top