QUERY command
The Query (QUERY) command obtains status
code and other information in the DL/I interface block (DIB), which
is a subset of the IMS PCB.
Format
Options
USING PCB(expression)
is required. No other options are allowed with the QUERY command.
Usage
For full-function databases, the DIB should contain NA, NU, TH or blanks. For an explanation of the codes, see IMS Version 15.6 Messages and Codes, Volume 4: IMSComponent Codes.
Use
the QUERY command after scheduling the PSB but before
making the database call. If the program has already issued a call
using the DB PCB, you then use the REFRESH command
to update the information in the DIB.
Example
Example 1EXEC DLI QUERY USING PCB(expression);Explanation: This
example shows how to specify the QUERY command. In
this example, (n) specifies the PCB.
EXEC DLI REFRESH DBQUERY;Explanation: If
your program has already issued a call using the DB PCB name, use
the REFRESH command to update the information in
the DIB. The REFRESH command updates all DB PCBs.
You can issue it only one time.
Restrictions
Restrictions for
the QUERY command:
- To use this command you must first define an I/O PCB for your program.
- You cannot reestablish position in the midst of nonunique keys or nonkeyed segments.
