Virtual TapeServer 8.3 Configuration Guide

Creating and Managing Virtual Media | 115
To use a TACL macro in obey script
On the NonStop server, you can 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 the EMS collector to the collector named in the EMS configuration settings of VTS:
#SET collector $0
Specify the event number:
#SET evt_num 1234
Specify how the message will be displayed in an EMS viewer, such as ViewPoint. In this example,
inverse text is used until the event is acknowledged but the event is listed in normal text:
#SET action -1
#SET emphasis -1
Issue the VTSPolicy command; see "Automatically migrating virtual tapes to physical tapes using
VTSPolicy" on page 111 for an explanation of the parameters. TSM is used in this example:
#SET evt_text VTSPolicy TSM ā€œ/VAULT01/Pool st=VTS1 r=14,dā€
Here is a example of the full script, with the commands inserted:
#PUSH evt_x evt_error req_error req_read req_prompt
#PUSH action_id collector
#LOAD /LOADED evt_x/ $system.zspidef.zemstacl
#LOAD /LOADED evt_x/ $system.zspidef.zspitacl
#LOAD /LOADED evt_x/ $system.zspidef.ztactacl
#LOAD /LOADED evt_x/ $system.zspidef.ztaptacl
#DEF evt_buf STRUCT BEGIN BYTE b(1:3000); END;
#SET collector $0
#SET action_id 0
#SET evt_error [#REQUESTER /WAIT/ READ [collector] req_error req_read req_
prompt]
#PUSH evt_num action emphasis evt_text text_len
#SET evt_num 1234
#SET action -1
#SET emphasis -1
#SET evt_text VTSPolicy TSM 'archive /VAULT01/PoolA s=VTS1 o=/tape/opt1
erase=YES'
#SET text_len #SET evt_error [#EMSINIT evt_buf [ZEMS^VAL^EXTERNAL^SSID]
[evt_num] ZEMS^TKN^TEXT [#charcount evt_text] [evt_text]]
#SET evt_error [#SSPUT evt_buf ZEMS^TKN^EMPHASIS [ZSPI^VAL^TRUE]]
#SET evt_error [#SSPUT evt_buf ZEMS^TKN^ACTION^NEEDED [ZSPI^VAL^TRUE]]
#APPENDV req_prompt evt_buf