QUERY BLOCKS

Read syntax diagramSkip visual syntax diagram Query BLOCKS fn* ft* Adiridbfsid(STACKFIFOLIFOFIFOLIFO)

Authorization

General User for SFS files. An SFS administrator may enter this command for byte file system (BFS) files.

Purpose

Use the QUERY BLOCKS command to determine how much space an SFS file, BFS regular file, or set of files is using for its data and how much space the system is using for the file(s).

Operands

fn
is the file name queried.
ft
is the file type queried.

If fn ft is specified as asterisks, the amount of space used by all the files contained in the dirid is shown.

dirid
is the directory queried. If dirid is omitted, the directory queried is the one accessed as A. You can also use a file mode for the dirid if the directory is already accessed. For more information on dirid, see Naming Shared File System (SFS) Directories.
bfsid
identifies the byte file system (BFS).

For a BFS file, fn and ft are system-generated values that together uniquely identify the file within the BFS.

Responses

  • For
    Directory = dirname
    Filename Filetype Fm Type Datablocks Systemblocks
    fn       ft       fm type dblocks    sblocks
    fn       ft       fm type dblocks    sblocks
     .        .        .  .    .          .
     .        .        .  .    .          .
     .        .        .  .    .          .

    The second line of the header is generated only if output is displayed at the terminal; the first line containing the directory name is always included.

Where:

Filename
is the name of the file or subdirectory.
Filetype
is the file type.
Fm
is the file mode of the directory in which the file or subdirectory resides. If the directory is not accessed, this column contains a dash (–). For example:
query blocks * * fpool:mary.
returns:
Directory = FPOOL:MARY.
Filename Filetype Fm Type    Datablocks  Systemblocks
EXAMPLE  SCRIPT   A1 BASE    1           0
CODING   STANDRDS A1 ALIAS   2           1
SAMPLES           B  DIR     -           -
TESTCASE          B  DIRC    -           -
CODING3  STANDRDS A6 ERASED  -           -
CODING4  STANDRDS A1 REVOKED -           -
OTHER    STANDRDS A1 EXTRNL  -           1
type
specifies one of these:
  • BASE specifies a base file in a directory
  • DIR specifies a FILECONTROL directory
  • DIRC specifies a DIRCONTROL directory
  • ALIAS specifies an alias in a directory
  • ERASED specifies an erased alias
  • REVOKED specifies a revoked alias
  • ALIAS* specifies an alias of a file in DFSMS/VM migrated status
  • BASE* specifies a base file in DFSMS/VM migrated status
  • EXTRNL specifies an external object.
datablocks
is the actual number of blocks used by the data in the file only. In general, this will be the same as the noblks value returned by FILELIST and LISTFILE. However, for sparse variable files, the empty blocks which are not allocated are not included in the count. The FILELIST and LISTFILE commands do include empty blocks for the variable files however, they do not include them for fixed files.
systemblocks
is the additional number of blocks used by the system for the file, in addition to the data blocks.

Options

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

Usage Notes

  1. Only file and system blocks are counted. Space used by the SFS catalogs is not reflected here.
  2. An external object itself does not use file space. However, it can have system blocks associated with it.
  3. If you specify fn ft, you need read authority on the directory containing that file.
  4. All blocks for which counts are returned are 4K bytes in length.
  5. A value for datablocks is returned for base files and active aliases (that is, not aliases not revoked nor erased) only. The value displayed for an alias actually refers to the base file. QUERY BLOCKS displays a dash (–) in the datablocks column for all other types of file pool objects.
  6. A value for systemblocks is returned for base files, active aliases and external objects only. The value displayed for an alias actually refers to the base file. QUERY BLOCKS displays a dash (–) in the systemblocks column for all other types of file pool objects.

    Byte file system (BFS) files larger than one block in size will contain a non-zero value in the system block field. When these files are read using DMSOPEN/DMSREAD, DMSOPBLK/DMSRDBLK, or DMSOPDBK/DMSRDDBK, system blocks are created. The system blocks field of the QUERY BLOCKS output will contain the number of system blocks created when these routines are used to read a BFS file.