QUERY

Retrieve information about a result set and the resource table records it contains.

Read syntax diagramSkip visual syntax diagram>>-QUERY--RESULT(cpsm-token)--+-----------------+--------------->
                              '-COUNT(data-ref)-'
 
>--+----------------------+--+------------------+--------------->
   '-DATALENGTH(data-ref)-'  '-OBJECT(data-ref)-'
 
>--+----------------+--+-------------------+-------------------->
   '-TYPE(data-ref)-'  '-CONTEXT(data-ref)-'
 
>--+-----------------+--THREAD(cpsm-token)---------------------->
   '-SCOPE(data-ref)-'
 
>--RESPONSE(data-ref)--REASON(data-ref)------------------------><
 

Description

This command retrieves information about a result set and the resource table records it contains.

Related commands

COPY, GET, GETDEF, GROUP, PERFORM OBJECT

Options

CONTEXT(data-ref)
Names a variable to receive the context associated with the result set.
COUNT(data-ref)
Names a variable to receive the number of resource table records in the result set.
DATALENGTH(data-ref)
Names a variable to receive the length of the resource table records in the result set.
OBJECT(data-ref)
Names a variable to receive the name of the resource table currently associated with the result set.
REASON(data-ref)
Names a variable to receive the fullword reason value returned by this command.
RESPONSE(data-ref)
Names a variable to receive the fullword response value returned by this command.
RESULT(cpsm-token)
Identifies the API result set to be processed by this operation. The result set can be one produced by any of these commands:
  • COPY
  • GET
  • GETDEF
  • GROUP
  • PERFORM OBJECT.
SCOPE(data-ref)
Names a variable to receive the scope associated with the result set. This value may be blank for result sets containing CMAS type resources.
THREAD(cpsm-token)
Identifies the API thread to be used for this operation. The cpsm-token value that identifies a thread is returned by the CONNECT command.
TYPE(data-ref)
Names a variable to receive a 1-character value that indicates what type of records are in the result set:
T
Resource tables supplied by CICSPlex SM.
V
Views of a resource table created by a SPECIFY VIEW command issued previously on this processing thread.

Conditions

The following is a list of the RESPONSE values that can be returned by the QUERY command. The description of each RESPONSE includes a list of associated REASON values, if appropriate.

OK
The command completed processing successfully.
BUSY
A busy condition occurred for the following reason:
RESULT
The result set specified on the RESULT option is being processed by another command.
ENVIRONERROR
An environment error occurred for one of the following reasons:
NOSERVICE
The application stub program could not load the API service module.
NOSTORAGE
The application stub program could not obtain the necessary storage in the address space where the processing thread is running.
SOCRESOURCE
A required resource that is owned by the CMAS is not available.
FAILED
The command failed for one of the following reasons:
ABENDED
Command processing abended.
EXCEPTION
Command processing encountered an exceptional condition.
INVALIDPARM
An invalid parameter was detected. The parameter that is invalid is returned as the reason value:
  • CONTEXT
  • DATALENGTH
  • OBJECT
  • RESULT
  • THREAD
  • TYPE.
Check the command description for valid parameter syntax.
NOTAVAILABLE
A not available condition occurred for one of the following reasons:
APITASK
The API control subtask is not active.
CPSMAPI
The CMAS to which the processing thread is connected is not available for API processing.
SERVERGONE
The CMAS to which the processing thread was connected is no longer active.
VERSIONINVL
A version conflict occurred for one of the following reasons:
NOTSUPPORTED
The version of the application stub program used for this command is not supported.
NOTVSNCONN
The version of the application stub program used for this command is not the same as the version used with the CONNECT command.
[[ Contents Previous Page | Next Page Index ]]