QUERY LDEVS

Read syntax diagramSkip visual syntax diagram Query LDEVs ldevldev1-ldev2

Authorization

Privilege Class: B, G

Purpose

Use QUERY LDEVS to display the status of logical devices.

Operands

LDEVs
displays information about logical devices. If you specify LDEVS, the responses show the user ID of the virtual machine that created the logical device.
ldev
ldev1-lev2
displays information about the specified logical devices. Specify each ldev as an L followed by 1 to 4 hexadecimal digits. You can specify 1 logical device, a range of logical devices, or any combination thereof.

Responses

In the following responses, PRT is a printer and GRAF is a display station. Most of the following examples show responses where someone specified LDEVS on the QUERY command. If you omit LDEVS, CP does not display the host information at the end of each response. The rest of the response remains unchanged.

The responses to this query command may be suffixed with one of the following status indicators:
'HOST hostid'
usual response - may be followed by 'FROM ipaddress' for TCP/IP.

An IPv4 address is displayed in dotted-decimal format.

Example: 9.130.44.144

An IPv6 address is displayed in compressed format (:: designates multiple 16-bit groups of zeros).

Example: The following is an IPv6 address:
F802:0000:0000:0000:0000:0000:0A00:0001
This address is displayed in compressed format as:
F802::A00:1
'NO HOST'
defined without a hostid
'LDDBK DEAD'
LDDBK was flagged as terminated.

Response 1:

If a virtual machine user is logged on at the device, you see a response like this:
query ldev L101
GRAF L0101 LOGON  AS JIM    0009 HOST PVM      
Ready;
This means that user ID JIM is logged on to the graphic display device at logical device number L0101 and is using virtual console address 0009. PVM is the user ID that created the specified logical device.

Response 2:

If the logical device is dedicated to a user, you see a response like this:
query L102
PRT  L0102 ATTACHED TO SUSIE   002A
Ready;
L0102 is the logical device number of the printer. The printer is attached as the virtual device 002A to user SUSIE's virtual machine.

Response 3:

If the system is using a logical device that needs operator intervention, you see a response like this:
query ldev L103
GRAF L0103 has intervention required.
GRAF L0103 LOGON AS LAYLA   03E0 HOST PVM
Ready;
L0103 is the logical device number of the graphic display that needs intervention. PVM is the user ID that created the specified logical device.
If the logical device that needs system intervention is a printer, you see a response like this:
q L102
Printer L0102 has intervention required.
PRT  L0102 ATTACHED TO SUSIE   0102
Ready; 

Response 4:

If the device is free, you see a response like this:
query ldev L102-L105
GRAF L0102 ENABLED   HOST TCPIP    FROM 9.130.58.78
GRAF L0103 ENABLED   HOST PVM
PRT  L0104 DISABLED  HOST PVM
GRAF L0105 ENABLED   HOST TCPIP    FROM 9.130.58.29
Ready;
PVM and TCPIP are the user IDs that created the specified logical devices.
If you do not specify LDEVS, CP omits the host information at the end of each response and displays instead information on up to 3 logical devices on each line:
query ldevs L0102-L0105
GRAF L0102 ENABLED  , GRAF L0103 ENABLED  , PRT L0104 DISABLED
GRAF L0105 ENABLED
Ready;

Messages

  • HCP003E Invalid option - option
  • HCP009E Invalid range - range
  • HCP040E Device ldev does not exist
  • HCP1003E ldev was not found.
  • HCP1100E A logical device number was not supplied or it is invalid.