QUERY DISK

Read syntax diagramSkip visual syntax diagram Query DISK *fmR/WMAXFIRSTR/W(STACKFIFOLIFOFIFOLIFO)

Authorization

General User

Purpose

Use the QUERY DISK command to display the status of a disk or Shared File System (SFS) directory.

Operands

fm
specifies the file mode letter of the directory queried.
*
specifies all accessed CMS disks and SFS directories are to be queried. This is the default.
R/W
queries the status of all CMS disks and SFS directories that have been accessed in read/write mode.
MAX
queries the status of the disk or directory accessed in read/write mode that has the most available space. SFS directories are considered only when you have R/W authority to those directories that are accessed R/W.
FIRSTR/W
queries the status of the first CMS disk or SFS directory in the search order accessed in read/write mode.

Responses

One line is displayed for each accessed disk or directory.
LABEL VDEV M STAT CYL TYPE BLKSIZE FILES BLKS USED-(%) BLKS LEFT BLK TOTAL
label vdev m stat cyl type blksize files blks_used     blks_left blk_total
If the disk is an OS or DOS disk, the response is:
LABEL VDEV M STAT CYL TYPE BLKSIZE FILES BLKS USED-(%) BLKS LEFT BLK TOTAL
label vdev m stat cyl type         files
Where:
label
is either the label assigned to the disk when it was formatted or the volume label if it is an OS or DOS disk. If it is an SFS directory, a dash is displayed in the label column.
vdev
is either the virtual device number for a disk or DIR for an SFS directory. If the directory has the directory control (DIRCONTROL) attribute, DIRC is displayed instead of DIR.
m
is the file mode letter.
stat
indicates whether a disk or SFS directory status is read/write (R/W) or read/only (R/O).
cyl
is the number of cylinders available on the disk. For an FB-512 device, this field contains the notation FB rather than the number of cylinders. For an OS-formatted disk, the number of cylinders available may appear to be larger or smaller than the number actually available. CMS uses the device size field in the format 4 DSCB in the OS VTOC to report this size. A dash is displayed for an SFS directory.
type
is the device type of the disk or a dash is displayed for an SFS directory.
blksize
is the CMS disk block size when the minidisk was formatted. For an SFS directory, the block size is always 4096.
files
is the number of CMS files on the disk or the number of base files, aliases, subdirectories, erased aliases, and revoked aliases in the directory. For an OS or DOS disk, OS or DOS is displayed.
blks_used
indicates the number of CMS disk blocks in use. The CMS disk blocks include both data blocks and control blocks. The percentage of blocks in use is also displayed. When the calculated percentage is zero and there are files on the disk, the percentage will be displayed as 01. A dash is displayed for an SFS directory.
blks_left
indicates the number of disk blocks left. This is a high approximation because control blocks are included. A dash is displayed for an SFS directory.
blk_total
indicates the total number of disk blocks. A dash is displayed for an SFS directory.
Response Messages
  • If the disk or directory with the specified file mode is not accessed, the response is:
    Disk fm not accessed
  • If there are no disks or directories accessed in read/write mode, the response to QUERY DISK R/W or QUERY DISK FIRSTR/W is:
    No read/write disk accessed
  • If there is no space available on any of the disks or directories accessed in read/write mode, the response to QUERY DISK MAX is:
    No read/write disk or directory with space is accessed

    All directories in the same file space share the space; therefore, the available space for a directory is based on the amount of space available in the file space. If communication fails between this command and the file pool, CMS assumes there is at least one block of read/write storage for a directory that is accessed as read/write.

Examples

This is an example of the results of QUERY DISK:
LABEL  VDEV M  STAT   CYL TYPE BLKSZ   FILES  BLKS USED-(%) BLKS LEFT  BLK TOTAL
SMI191 191  A   R/W    25 3380 4096     1325       2747-73       1003       3750
OSTEST 18F1 B/B R/O  3339 3390            OS
VSAM01 300  C   R/W   200 3380           DOS
-      DIR  D   R/W     -    - 4096       31             -          -          -
ESA190 190  S   R/O    86 3380 4096      350       9197-71       3703      12900
ESA19E 19E  Y/S R/O   200 3380 4096      903      14939-50      15061      30000

Options

For more information on the Options, Usage Notes, and Error Messages that apply to all operands of the QUERY command, see QUERY.