Writing to VSE/VSAM Virtual Tapes

WRITE can only start at the beginning of a VSE/VSAM virtual tape. No rewrite or overwrite of existing data is possible except from the beginning a tape. For writing to a VSE/VSAM virtual tape more than once, the file definition (skeleton SKVTAPE) must include the REUSE parameter. Once a VTAPE STOP command has been issued, the remaining buffer content is written to tape. The tape is closed, and an end-of-volume (EOV) indicator is written. This means, no further data can be appended (added) to this particular virtual tape.

Note: VSAM cluster can be defined as compression, but the compression rate can vary a large amount depending on the type of data.
There are three ways of writing to a VSE/VSAM virtual tape:
  1. The VSE/VSAM file is defined with REUSE.

    During OPEN processing the tape is positioned to its beginning before a WRITE operation starts. Existing data is overwritten.

  2. The VSE/VSAM file is defined with REUSE and VTAPE START includes the SCRATCH parameter.

    SCRATCH causes the tape to be cleared before WRITE starts at the beginning of the tape.

  3. The VSE/VSAM file is defined with NOREUSE.

    You can write to the tape only once (for backup, for example).

    NOREUSE with SCRATCH is invalid and causes an error.