With a Read-only VTS, only tableBASE read commands are allowed to operate on the VTS (group a). Hardware key protected VTS-TSRs as well as SAF protected VTS-TSRs started up in read-only mode fall into this category. In order to perform tableBASE update commands on the VTS (group b), which include commands for opening tables into the VTS, the VTS much be switched to read-write mode.
A Read-only VTS is switched to read-write mode using the VV (Vary VTS) command. This command can only be issued by batch programs linked with the linkage editor input, SETCODE AC(1) and run from an authorized library. It cannot be run from a CICS, IMS or WLM-managed DB2 SPAS region. If the VTS is also SAF protected, the user-id executing the command must have a minimum authorization of CONTROL to the VTS.
Executing the VV command from a batch program that is not authorized will cause an abend of S047. If an authorized program bypasses tableBASE controls in order to update a VTS, it will be successful i.e. it is the responsibility of the client to ensure that programs cannot be easily authorized.
When a VTS is switched to read-write mode, the job that performs the switch holds a read-write lock on the VTS and no other job or region can access the VTS until it is switched back to read-only mode. A VTS can only be switched back to read-only by the same job step that holds the read-write lock.
If a VTS is locked in read-write mode after the job that holds the lock terminates abnormally, it can be forced back to read-only mode by supplying a special request id for the VV command.
Detailed information on the VV command can be found in Chapter 3 of the tableBASE Programming Guide.
Each time a VTS is successfully switched, its generation number increases by 1. To continue to access a VTS that has its generation number changed, the START-TBUOW field in the COMMAND-AREA must contain an S. For more information on the START_TBUOW parameter, please refer to the tableBASE Programming Guide.