Virtual TapeServer 6.04.02 Operations and Administration Guide

62 | Managing Pools and Virtual Tapes
7. Click ERASE or DELETE.
8. When prompted, click OK to confirm the operation.
Automation using VTSPolicy commands
The VTSPolicy command enables you to automatically erase or delete specific virtual tapes
directly from a NonStop server. You can initiate these operations by configuring the NonStop
server to send an EMS message to VTS. You can configure the NonStop server by defining a
file utility program (FUP) call or by creating a Tandem Advanced Command Language
(TACL) macro.
The syntax of the VTSPolicy command is as follows:
VTSPolicy Erase|Delete - virt_tape ... [s=hostname]
where virt_tape is the name of the virtual tape to erase or delete, and hostname is the name of
the VTS server that will process the command (the s parameter is optional). To specify
multiple virtual tapes to erase or delete, simply list them after the - and separate them using
spaces.
You can specify up to 79 characters in the command string. Note that this VTSPolicy
command is case-sensitive.
For example, to erase the virtual tapes named A00001, A00002, and A00003, issue this
command:
VTSPolicy Erase - A00001 A00002 A00003
To delete the virtual tape named GB0002, and to indicate that the vts-prod2 server should
process this policy request, issue this command:
VTSPolicy Delete - GB0002 s=vts-prod2
You can issue a simple FUP call to copy the contents of a text file to the $0 process. Create a
text file on the NonStop server that contains the VTSPolicy command. Then, from Batchcom
or within an existing backup script, run the following command:
FUP COPY filename, $0
This sends the contents of the file to the EMS collector.
Or, you can create a TACL macro to issue the command. On the NonStop server, create an
obey script that includes a TACL macro that communicates with the VTS server through
EMS. In the script file, add the commands specified below. To initiate the script, run the
script using the obey command, add the lines to the end of an existing script, or schedule the
script to run from Batchcom.
#SET collector $0
#SET evt_num number
#SET action -1
#SET emphasis -1
#SET evt_text VTSPolicy Erase|Delete - virt_tape... [s=hostname]
Here is an explanation of the lines:
#SET collector $0
Refers to the EMS collector to which to send the message. Change collector to the
name of the collector in the EMS configuration settings on VTS.