QUERY DIAGNOSE

Read syntax diagramSkip visual syntax diagram Query DIAGnose ALLdiagdiag1- diag2

Authorization

Privilege Class: A, C, E

Purpose

Use QUERY DIAGNOSE to display information (status, entry point names, and privilege classes) about one or more DIAGNOSE codes.

Operands

ALL
tells CP to display information about all existing DIAGNOSE codes.
diag
diag1-diag2
is the number of the DIAGNOSE code for which you want information. Each diag must be a hexadecimal number between X'0000' and X'03FC'. You can specify a single DIAGNOSE code, a range of DIAGNOSE codes, or any combination thereof.

Usage Notes

  1. If you do not specify the ENABLE operand on the DEFINE DIAGNOSE command, a new DIAGNOSE code is initially in a disabled state after being defined. CP treats disabled DIAGNOSE codes as if they were never defined. If you try to use a disabled DIAGNOSE code in a program, CP will give you a program check specification exception.
  2. To activate a new DIAGNOSE code:
    • While defining it, use the ENABLE operand of the DEFINE DIAGNOSE command (see DEFINE DIAGNOSE).
    • After defining it, use the ENABLE DIAGNOSE command (see ENABLE DIAGNOSE).
  3. To change the definition of an existing DIAGNOSE code after initialization, use the MODIFY DIAGNOSE command (see MODIFY DIAGNOSE).
  4. To display the address of the CP DIAGNOSE code table block for a DIAGNOSE code, use the LOCATE DGNBK command (see LOCATE DGNBK).
  5. To deactivate a DIAGNOSE code:
    • While defining it, use the DISABLE operand of the DEFINE DIAGNOSE command (see DEFINE DIAGNOSE).
    • After defining it, use the DISABLE DIAGNOSE command (see DISABLE DIAGNOSE).
  6. Many external security managers (ESMs) do not support DIAGNOSE codes above X'03FC'. For this reason, CP does not support DIAGNOSE codes above X'03FC'. The DIAGNOSE codes between X'0000' and X'03FC' are divided as follows:
    X'0000' to X'00FC'
    Reserved for IBM® use
    X'0100' to X'01FC'
    Reserved for customer use
    X'0200' to X'03FC'
    Reserved for IBM use.
  7. For more information about user-defined DIAGNOSE codes, see Defining and Modifying Commands and Diagnose Codes in z/VM®: CP Exit Customization.

Responses

Response 1:

To display the current information for DIAGNOSE code X'28' and DIAGNOSE codes X'30' through X'3C', enter the following:
query diagnose 28 30-3f
Code  Status   EPName   PrivClasses
0028  Enabled  HCPDCHNM <ANY>
0034  Enabled  HCPHVC34 CE
003C  Enabled  HCPUDSDS ABC
Ready;
This response tells us that DIAGNOSE codes X'28', X'34', and X'3C' are enabled and that DIAGNOSE codes X'30' and X'38' are not defined.

Messages

  • HCP002E Invalid operand - operand
  • HCP003E Invalid option - command contains extra option(s) starting with option
  • HCP021E A Diagnose code was not supplied or it is not valid
  • HCP2751E Diagnose code diag does not exist.
  • HCP2751E Diagnose codes diag1-diag2 do not exist.
  • HCP6706E Invalid Diagnose code - diag