Dumping Standard Spool Files to Tape
Use the SPXTAPE DUMP command to save copies of standard spool files on tape. SPXTAPE processes only closed reader, printer, and punch files; open or in-use files cannot be dumped. By default, the files are dumped regardless of their hold status.
To dump all the standard spool files to tape:
- Find one or more free tape drives (it is recommended that you
use at least two drives to allow overlapping tape mounting) and mount
scratch tapes on them. A free tape drive is one that is not offline, in use, or dedicated to another virtual machine. The tape drive must be fully supported by z/VM. For a list of supported devices, see the z/VM: General Information. To find out the status of all of your tape drives, enter:
query tapes all
If the status of any tape drive is FREE, mount the scratch tape, which has been enabled for writing, and go to the next step. To write-enable a tape reel, make sure the tape has a write-enable ring. To write-enable a tape cartridge, turn the thumbwheel on the cartridge so the white dot does not show.
If the status of any tape drive is OFFLINE, enter:
where rdev is the tape drive's real device number. Then mount the scratch tape, enabled for writing, and go to the next step.vary online rdev
- Attach each tape drive to your virtual machine. Enter:
where vdev is an available virtual device number.attach rdev to * as vdev
- Spool your console to wherever you want the SPXTAPE log files
to go. For example, spool the console to yourself so the logs are
sent to your reader. Enter:
spool cons *
Note: If you spool your console after entering the SPXTAPE command, the logs may be sent to different destinations. - If necessary, use the CMS TAPE command to position each tape to where CP can begin dumping files. The tape must be positioned either at the beginning of the volume or following a tape mark.
- Dump all the standard spool files to tape. Enter:
where vdev1-vdev2 is the range of virtual device numbers of the tape drives you are using. If you are using only one drive, you can enter a single virtual device number. The RUN operand rewinds and unloads the tape when processing to that volume completes.spxtape dump vdev1-vdev2 std all run
In response, CP dumps a copy of each closed reader, printer, and punch spool file to tape without removing the files from their queues on the system. All the available tape drives in the specified range are used concurrently; while one file is still being written to a tape, the next file is written to the next available tape. As it processes the files, CP reports its progress at the interval requested with the PROGress_interval option (or about every 15 seconds by default) by displaying a message on the screen.
Note: If CP is running out of either spooling space or spool file identification numbers to assign to new files, you may wish to have CP purge each file after dumping the file to tape. If you do, use the PURGE operand as follows:spxtape dump vdev1-vdev2 std all run purge
CP responds as before, except it removes each dumped file from the queue. CP also tells the file owner (you or another user) it has purged the file.
CP records information about the dump in two or more logs. The command summary log contains information about the progress and status of the logical SPXTAPE command. A logical SPXTAPE command can be either one independent command or a sequence of appended commands (entered with the APPEND operand). The volume log contains information about the files processed by the logical SPXTAPE command that are associated with a particular tape volume. Therefore, several volume logs are created for one logical SPXTAPE command if more than one tape drive is used or if more than one tape volume is mounted on any drive.
If any tape is filled before all the files are dumped, CP sends you a response that:
- Asks you to mount the next tape on that device
- Indicates the number of files and spool pages processed so far.
If you are using more than one tape drive, CP continues dumping to the other drives. When you mount and ready the new tape, CP starts dumping to that drive again. When CP has dumped all the files, it tells you the dump function is complete.
- Remove the tapes from the tape drives.
- If you want to find out what files have been dumped, you can look
at the volume logs. Each volume log has a unique name (file name and
file type) related to both the tape volume and the SPXTAPE command
that caused the creation of the log. For example, the volume log for
the first volume processed on virtual device 181 for an SPXTAPE DUMP
command has the name:
where xxyy is the month and day the command was issued, D indicates the operation was DUMP, 181 is the virtual device number of the tape drive, hhmmss is the time stamp, and 01 is the volume sequence number.xxyyD181 hhmmss01
The volume log contains the following entry for each file written to the volume: Some of the entries have been truncated to fit the page.USERID FILE QUEUE FILNAM FILTYP OPNDAT OPNTME ORIGID SZ SEG_STAT HLDSTAT RCCOUNT C FORM DEST LSTPGE userid file queue filnam filtyp opndat opntme origid sz COMPLETEhldstat rccount c form dest lstpge
Note: The heading is included only once for each uninterrupted series of entries.If the SEG_STAT field contains PARTIAL instead of COMPLETE, the file is split between this volume and one or more other volumes, and this is not the part that completes the file (the last part dumped). If all parts of the file have dumped correctly, the volume log entry for the last part dumped contains COMPLETE in the SEG_STAT field.
The preceding steps tell you how to dump all the standard spool files to tape. You can also select the spool files to be dumped by queue, user ID, spool file identification number or range, class, destination value, form name, file name pattern, file type pattern, hold status, SSI copy status, or combinations of these attributes. A file name or file type pattern can be either a complete file name or file type or a string containing wild cards (* and %). The following example shows you how to dump particular classes of files from the reader and printer queues.
For more information about the SPXTAPE logs and the options you can specify on the SPXTAPE DUMP command, see the z/VM: CP Commands and Utilities Reference.