As part of the most recent releases of z/VSE (version 3.1 and above), IBM provides the VSE Virtual Tape Server, a facility that allows writing and reading "virtual" tapes created on a PC, instead of on a physical tape or cartridge unit.
This document covers the following topics:
A virtual tape is usually represented by a file in AWSTAPE format, which can be either a VSE/VSAM file, or a file on any Java-enabled platform. The file contains all data records, as well as tape marks, headers and end-of-record entries that you would have on a regular tape.
The VSE Virtual Tape Server supports the following tape image formats:
AWSTAPE format
This format is known from the P390 tape emulator. You can
directly use tape images created by a P390 with the VSE Virtual Tape Server,
and vice versa. Usually, AWSTAPE files uses the extension
.aws, however, files can be named with any extension,
except .zip and .ptf.
Binary PTF format
Binary PTF format files contain a PTF job stream. The records
are stored in binary with a record length of 80. Since the PTF format file does
not contain tape marks, the VSE Virtual Tape Server emulates these tape marks
when accessing PTF format files. To be recognized as PTF files, the file name
must end with .ptf.
Zipped AWSTAPE format
The VSE Virtual Tape Server is able to access AWSTAPE images
directly within a Zip file. You do not have to unzip the files before using
them with the VSE Virtual Tape Server. The VSE Virtual Tape Server
automatically unzips the data on demand. However, Zip support is for read-only
access.
To access an AWSTAPE file within a Zip file, you have to
specify both names separated with an exclamation mark or a colon at the
VTAPE START
command, as follows:
VTAPE START,UNIT=cuu,LOC=ipaddr,FILE='zip-file!aws-file',READ
Zipped PTF format
The VSE Virtual Tape Server is able to access PTF format
files directly within a Zip file. You do not have to unzip the files before
using them with the VSE Virtual Tape Server. The VSE Virtual Tape Server
automatically unzips the data on demand. To be recognized as PTF files, the
file name within the Zip file must end with .ptf. However,
Zip support is for read-only access.
To access a PTF format file within a Zip file, you have to
specify both names separated with an exclamation mark or a colon at the
VTAPE START
command, as follows:
VTAPE START,UNIT=cuu,LOC=ipaddr,FILE='zip-file!ptf-file',READ
Basically, two components have to be implemented to use the VSE Virtual Tape Server. This is described in the following topics:
Create a directory with write-access on the PC (for example, c:\temp\VSE Virtual Tape Server).
Download the file vtape410.zip from the following IBM website to the directory created in the previous step:
http://www-03.ibm.com/servers/eserver/zseries/zvse/products/vtape.html
Extract the contents of the downloaded Zip file into the directory that you have previously created (for example, into c:\temp\VSE Virtual Tape Server).
Once unzipped, run the file install.bat from the created directory, and follow the instructions in the VSE Virtual Tape Server install wizard.
The following job needs to reside permanently
(DISP=L
) in the RDR queue of the VSE machine from where the
virtual tape is generated:
// JOB TAPESRVR START UP VSE TAPE SERVER // ID USER=VCSRV,PWD=VCSRV // LIBDEF *,SEARCH=(PRD2.CONFIG,PRD1.BASE,PRD2.SCEEBASE) // EXEC $VTMAIN /*
TAPESRVR executes this phase to activate the VSE Virtual Tape Server interface.
Important:
The name of the job on the RDR queue must be
"TAPESRVR".
A typical job for generating a virtual tape on this VSE machine would look as follows (COPYJOB):
// JOB VTBACKUP - SUBLIBRARY BACKUP USING VIRTUAL TAPE DRIVER - // ON $CANCEL OR $ABEND GOTO VTAPSTOP VTAPE START,UNIT=525,LOC=111.222.333.444,FILE='C:\TEMP\MYTAPE_FILE' MTC REW,525 // EXEC LIBR BACKUP SUBLIB=USERLIB.SUBLIB TAPE=525 /* /. VTAPSTOP VTAPE STOP,UNIT=525 /&
where:
525 is a tape unit available in the system.
111.222.333.444 is the TCP/IP address of the PC on which the virtual tape will be generated.
C:\TEMP\MYTAPE_FILE is the physical file that will be created on the PC specified by the TCP/IP address.
The following topics are covered below:
Start the VSE Virtual Tape Server on the PC where the file is going to be downloaded: From the Windows
menu, choose .This runs a batch file that executes the following Java program: com.ibm.vse.vtape.VirtualTapeServer.
Information similar to the following is shown:
The tape server runs in the background.
To stop the server at any time, enter "quit" in this window.
Once the tape server has been started on the PC, run the job on the mainframe that will connect to the tape server and download the file(s) to the PC (see sample COPYJOB above).
If the tape server is not started before the job is submitted on the VSE machine, the following error will occur on the mainframe:
1YM4I TAPE DATA HANDLER INITIALIZATION COMPLETED 1YM7t TAPE DATA HANDLER ENCOUNTERED CONNECTION ERROR
When this error occurs, you can either
supply the correct IP address of the PC where the virtual tape was started, or
start the tape server on the PC.
If the connection is successful from the job TAPESRVR on the mainframe to the PC where the VSE Virtual Tape Server is running, the following messages should appear:
In the PC command window where the VSE Virtual Tape Server is running:
Connection accepted from 555.666.777.888 Tapeimage file has been opened successfully
In the mainframe console:
1YM3I TAPE DATA HANDLER INITIALIZATION IN PROGRESS 1YM4I TAPE DATA HANDLER INITIALIZATION COMPLETED 1YM6I TAPE DATA HANDLER ACCESSED SPECIFIED FILE SUCCESSFULLY
COPYJOB automatically releases the TAPESRVR job from the RDR
queue, and, once it finishes executing on the VSE machine, generates a binary
file on the connected PC, with the name provided in the FILE=
field of the VTAPE
card.
A typical application is to backup and restore a sublibrary:
Back up a sublibrary to a PC
See the sample COPYJOB provided above.
Restore a sublibrary from a backup downloaded to a
PC
Use the following sample job to restore the sublibrary that
you have backed up in the previous step:
// JOB VTRESTOR - SUBLIBRARY RESTORE USING VIRTUAL TAPE DRIVER - // ON $CANCEL OR $ABEND GOTO VTAPSTOP VTAPE START,UNIT=525,LOC=111.222.333.444,FILE='C:\TEMP\MYTAPE_FILE' MTC REW,525 // EXEC LIBR RESTORE SUBLIB=USERLIB.SUBLIB TAPE=525 /* /. VTAPSTOP VTAPE STOP,UNIT=525 /&
Important:
To prevent holding a specific tape unit
indefinitely, always stop the tape unit used by any of the VSE Virtual Tape
Server jobs on the mainframe by issuing the appropriate command at the end of
the JCL: VTAPE
STOP,UNIT=nnn
.