RELEASE

Read syntax diagramSkip visual syntax diagram RELease vdevdiridfm(DETach)

Authorization

General User

Purpose

Use the RELEASE command to free an accessed disk previously accessed with the ACCESS command (ACCESS).

Operands

vdev
is the virtual device number of the disk to be released. The valid device numbers are X'0001' through X'FFFF'.
dirid
is the name of the directory to be released. For more information on the dirid, see Naming Shared File System (SFS) Directories.
fm
is the file mode letter for which the disk or directory is currently accessed.

Options

DETach
specifies the disk is to be detached from your virtual machine configuration; CMS calls the CP command DETACH.
Note: The DETACH option is ignored when you are releasing a directory.

Usage Notes

  1. If a disk or directory is accessed at more than one file mode, the RELEASE vdev or RELEASE dirid command releases all modes. If you specify the file mode of an already active disk or directory, that disk or directory is released.
  2. You cannot release the system disk (disk at file mode S).
  3. A list of the files on an accessed disk is maintained in your storage. When a disk is released, this list of files is freed from your storage and that storage becomes available for other CMS commands and programs.

    However, when you release an SFS directory, you do not immediately recover storage. When CMS does keep the list of files in your storage, the space may not be freed until it is needed by a CMS command or a program.

    When you release a R/W CMS disk either with the RELEASE command or implicitly with the FORMAT command or ACCESS commands, the list of files is sorted and rewritten on disk; as a result, the file search time may be reduced for users who subsequently access the same disk.

  4. When a disk or directory is released, its read-only extensions, if any, are not released. They may be referred to by their own file mode. If a disk or directory is then accessed with the original file mode that they were extensions of, they revert to being extensions of the new disk or directory at that file mode.

  5. In CMS/DOS, when you release a disk, any system or programmer logical unit assignments made for the disk are unassigned.
  6. The RELEASE command rewrites the file directory on any CMS disk accessed in R/W mode whether the disk was altered. The exception to this is when the ACCESS command has been issued with the ERASE option for a disk, and no files have been written to the disk since. RELEASE will not rewrite the directory in this case. For more information, see Usage Notes.
  7. Detaching a minidisk (with a CP DETACH command) will cause CMS to implicitly release the disk if it is accessed. Also, if a minidisk address is redefined (with a CP DEFINE or REDEFINE command), CMS will implicitly release the disk if it is accessed.

Examples

If you want to release and detach the 498 disk accessed as your file mode B, issue:
release 498 (det
or
release b (det
If you want to release the directory .PROJECT1 accessed as your file mode C, enter:
release .project1
or
release c

Responses

DASD vdev DETACHED

This is a CP message that is issued when you use the DETACH option. It indicates the disk has been detached.

Messages and Return Codes

  • DMS017E Invalid device address vdev [RC=24]
  • DMS017E The CMS system disk cannot be released [RC=24]
  • DMS028E No device specified [RC=24]
  • DMS048E Invalid filemode mode [RC=24]
  • DMS048E The CMS system disk cannot be released [RC=24]
  • DMS065E option option specified twice [RC=24]
  • DMS069E Filemode mode not accessed [RC=36]
  • DMS069E Disk vdev not accessed [RC=36]
  • DMS069E Directory dirname not accessed [RC=36]
  • DMS109S Virtual storage capacity exceeded [RC=104]

Additional system messages may be issued by this command. The reasons for these messages and their location are:

Reason Location
Errors in command syntax Command Syntax Error Messages
Errors in the Shared File System File Pool Server Messages