QUERY processing
The QUERY function queries information about messages that are on the message queues.
Selection parameters
Based on your selection criteria, query logic selects information about a message's age from the message queues. You specify the selection criteria in control statements.
Selection criteria
Specify the selection criteria to query logic with FUNCTION, INCLUDE, and EXCLUDE statements.
Use these statements to define a subset of the information to be selected from the message queues. The INCLUDE and EXCLUDE statements are optional. If neither of these statements is present, all age data for all destinations from the message queues is selected.
Message age data can be selected based on the following criteria:
- Specified in FUNCTION statement:
- Message age
- Queue type
- ALL
- APPC
- DEADQ
- LONG
- LTERM
- OTMA
- REMOTE (remote MSNAME queue)
- SHORT
- SERIAL (serial transaction queue)
- SUSPEND (suspend transaction queue)
- TRANSACTION (transaction ready queue (local and remote))
- Specified in INCLUDE or EXCLUDE statement:
- Destination
The FUNCTION statement, in the AGE= keyword, specifies
how old a message must be to be processed. And in the QUEUETYPE=
keyword,
the FUNCTION statement specifies one or more message queues to be
searched.
INCLUDE and EXCLUDE statements specify selection criteria that is specific to message destinations. INCLUDE and EXCLUDE statements are unrestricted in number.
If any INCLUDE statements are present, a record must meet all criteria for at least one INCLUDE statement to be included in the query logic selections. Unspecified criteria are considered to be met.
A record that meets all criteria that is specified by an EXCLUDE statement is excluded from the query logic selections, even if the record meets all of the criteria that is specified by the FUNCTION statement and an INCLUDE statement. Unspecified criteria are considered to be met.
Selection processing
IMS Queue Control Facility query logic calls IMS requesting that a QUERY function be invoked for the message queues that you specified.
When end-of-data is signaled by IMS, IMS Queue Control Facility query logic produces reports about the number of destination queues that QUERY found on the queues, and statistics about the number of records that QUERY processed.
IMS Queue Control Facility query logic then returns control to IMS Queue Control Facility control processing logic for clean up and normal termination.