QUERY

Purpose

Use the Query command to obtain information about all or parts of the OSA, OSA/SF, and OSA modes running on the OSA.

Syntax

Attention: The following abbreviations are used in the syntax diagram:
  • port - port number
  • sce - source
  • dst - destination
Note:
Read syntax diagramSkip visual syntax diagram
>>-QUERY-------------------------------------------------------->

>--+-HOST-----------------------------------------------------------------------+-->
   +-ONE_OSA--chpid-------------------------------------------------------------+   
   +-OSA_SF---------------------------------------------------------------------+   
   +-chpid----------------------------------------------------------------------+   
   +-IPX_INFO--chpid------------------------------------------------------------+   
   '-SNA_INFO--chpid--+-Port_View---------------------------------------------+-'   
                      +-Port_ Detail--port------------------------------------+     
                      +-SAP_View--port----------------------------------------+     
                      +-SAP_Detail--port--sce_SAP-----------------------------+     
                      +-NULL_SAP_Detail--port---------------------------------+     
                      +-Connect_View--port--sce_SAP---------------------------+     
                      +-Connect_Detail--port--sce_SAP--dst_SAP--dst_MAC-------+     
                      +-Clear_SAP_Detail--port--sce_SAP-----------------------+     
                      +-Clear_NULL_SAP_Detail--port---------------------------+     
                      '-Clear_Connect_Detail--port--sce_SAP--dst_SAP--dst_MAC-'     

>--+--------+--dataset_or_file_name----------------------------><
   '-VOLSER-'                         

Operands

Host
Returns all information about OSA/SF, CHPIDs, ports, OSA modes, and devices.
ONE_OSA
Returns information related to one CHPID (OSA). You must enter ONE_OSA with the CHPID number.
OSA_SF
Returns only information related to OSA/SF.
SNA_INFO
Used for SNA network management information. See the examples at the end of this section.
IPX_INFO
Use this option to query the IPX connection data. Specify a CHPID and a data set name with this option.
chpid
This value indicates the hexadecimal CHPID for the command. The value is not entered with single quotes around it. For example, CHPID 4B should be entered as 4B, not X'4B'.
VOLSER
You can specify the volume serial number. If nothing is specified, the system default is used. If the data set already exists, the VOLSER is ignored. The format is VOLSER or VOLSER(UNIT).
dataset_or_file_name
The name of the data set or file where the requested information is to be stored. This is required.

Limitations

If RACF is installed, Query requires READ authority. The RACF authority you specify pertains to the appropriate RACF facility as defined in Controlling access to OSA/SF for z/OS, and on page Table 1 for z/VM.

Examples

  1. Query the port view for CHPID 64 and put it in data set "USER4.QUERY.OUTPUT" (USER4 QUERY file on z/VM) ( PRD2.USER4.QUERY.OUTPUT on z/VSE).

    For z/OS: EX 'IOACMD.EXEC' 'QUERY SNA_INFO 64 PORT_VIEW USER4.QUERY.OUTPUT' EXEC

    Or, for z/VM: IOACMD QUERY SNA_INFO 64 PORT_VIEW USER4 QUERY

    For z/VSE: // EXEC REXX=IOACMD PARM='PRD2.OSASF QUERY SNA_INFO 64 PORT_VIEW PRD2.OSASF.USER4.QUERY.OUTPUT', SIZE=1100K

  2. Query the port details for CHPID 7C and show the data on the display.

    For z/OS: EX 'IOACMD.EXEC' 'QUERY SNA_INFO 7C PORT_DETAIL 0' EXEC

    For z/VM: IOACMD QUERY SNA_INFO 7C PORT_DETAIL 0

    For z/VSE: // EXEC REXX=IOACMD PARM='PRD2.OSASF QUERY SNA_INFO 7C PORT_DETAIL 0', SIZE=1100K

  3. Query the SAP view for CHPID 7C, port 1 and put the data set in "USER4.QUERY.OUTPUT" (USER4 QUERY file on z/VM) ( PRD2.USER4.QUERY.OUTPUT on z/VSE).

    For z/OS: EX 'IOACMD.EXEC' 'QUERY SNA_INFO 7C SAP_VIEW 1 USER4.QUERY.OUTPUT' EXEC

    For z/VM: IOACMD QUERY SNA_INFO 7C SAP_VIEW 1 USER4 QUERY

    For z/VSE: // EXEC REXX=IOACMD PARM='PRD2.OSASF QUERY SNA_INFO 7C SAP_VIEW PRD2.OSASF.USER4.QUERY.OUTPUT', SIZE=1100K

  4. Query the SAP details for CHPID 7C, port 1, SAP C and show the data on the display.

    For z/OS: EX 'IOACMD.EXEC' 'QUERY SNA_INFO 7C SAP_DETAIL 1 C'

    For z/VM: IOACMD QUERY SNA_INFO 7C SAP_DETAIL 1 C

    For z/VSE: // EXEC REXX=IOACMD PARM='PRD2.OSASF QUERY SNA_INFO 7C SAP_DETAIL 1 C', SIZE=1100K

  5. Query the NULL SAP details for CHPID 38, port 1 and show the data on the display.

    For z/OS: EX 'IOACMD.EXEC' 'QUERY SNA_INFO 38 NULL_SAP_DETAIL 1'

    For z/VM: IOACMD QUERY SNA_INFO 38 NULL_SAP_DETAIL 1

    For z/VSE: // EXEC REXX=IOACMD PARM='PRD2.OSASF QUERY SNA_INFO 38 NULL_SAP_DETAIL 1', SIZE=1100K

  6. Query the connection view for CHPID 7C, port 1, SAP 8 and show the data on the display.

    For z/OS: EX 'IOACMD.EXEC' 'QUERY SNA_INFO 7C CONNECT_VIEW 1 8'

    For z/VM: IOACMD QUERY SNA_INFO 7C CONNECT_VIEW 1 8

    For z/VSE: // EXEC REXX=IOACMD PARM='PRD2.OSASF QUERY SNA_INFO 7C CONNECT_VIEW 1 8', SIZE=1100K

  7. Query the connection details for CHPID 7C, port 1, source SAP 8, destination SAP 14, destination MAC 123456789012 and show the data on the display.

    For z/OS: EX 'IOACMD.EXEC' 'QUERY SNA_INFO 7C CONNECT_DETAIL 1 8 14 123456789012'

    For z/VM: IOACMD QUERY SNA_INFO 7C CONNECT_DETAIL 1 8 14 123456789012

    For z/VSE: // EXEC REXX=IOACMD PARM='PRD2.OSASF QUERY SNA_INFO 7C CONNECT_DETAIL 1 8 14 123456789012', SIZE=1100K

  8. Clear the SAP details for CHPID 68, port 1, SAP 4.

    For z/OS: EX 'IOACMD.EXEC' 'QUERY SNA_INFO 68 CLEAR_SAP_DETAIL 1 4'

    For z/VM: IOACMD QUERY SNA_INFO 68 CLEAR_SAP_DETAIL 1 4

    For z/VSE: // EXEC REXX=IOACMD PARM='PRD2.OSASF QUERY SNA_INFO 68 CLEAR_SAP_DETAIL 1 4', SIZE=1100K

  9. Clear the connection details for CHPID 20, port 0, source SAP 4, destination SAP 1C, destination MAC 123456789012 and show the data on the display.

    For z/OS: EX 'IOACMD.EXEC' 'QUERY SNA_INFO 20 CLEAR_ CONNECT_DETAIL 0 4 1C 123456789012'

    For z/VM: IOACMD QUERY SNA_INFO 20 CLEAR_ CONNECT_DETAIL 0 4 1C 123456789012

    For z/VSE: // EXEC REXX=IOACMD PARM='PRD2.OSASF QUERY SNA_INFO 20 CLEAR_ CONNECT_DETAIL 0 4 1C 123456789012', SIZE=1100K