LOCK function
The LOCK function corresponds to the Lock line command, which can be issued for objects from the TOBJOR view or sets from the TSETO view.
Use LOCK to prevent TOM from starting an object on a specific system in the VSL. If the object is ACTIVE when the LOCK function occurs, TOM stops the object. When you issue the LOCK function for an object, it affects the status of any other object that have dependencies on the object. When the system is IPL'd, TOM automatically unlocks the object on that system, which might cause it to be started.
When the LOCK function occurs for an ACTIVE object, TOM takes the following actions:
- Sets the object’s status to SCHEDULED-LOCKED on the system specified on the HOST parameter or on the ACTIVE system.
- Schedules any pre-stop commands defined for the object
- Stops the object.
- Schedules any post-stop commands defined for the object
After changing the object's status to SCHEDULED-LOCKED, TOM resets the value in object definition Exception field to NO and issues the stop command for the object. The object should stop and the object's status changes to LOCKED.
Restarting objects with LOCKED status
When a system is IPLed, TOM unlocks any objects with a status of LOCKED on the IPLed system, allowing TOM to start the objects when TOM determines that their schedule and dependency criteria are satisfied.
To allow TOM to start an object with status of LOCKED on a specific system before that system is IPLed, you must perform one of the following actions (from the UI, in an EXEC, or from the operator console):
- Issue the START command
- Specify the UNLOCK command with the system name in the HOST parameter
- Issue the RESET RESETOPT(STATUS) command
- Issue the RESET RESETOPT(ALL) command
If the object has multiple systems in its VSL and the object is not ACTIVE on one of those systems, TOM starts the object if you issue an UNLOCK function (or command) for that system or, if you issue RESET RESETOPT(STATUS) or RESET RESETOPT(ALL) function (or command) for the object.
The following table shows the command and parameters:
Command | Parameters |
---|---|
TOMEXEC FUNCTION(LOCK) | OBJECT(name)|SET(name) [HOST(hostname)] DEFBASE(name) SYSPLEX(name) [CMDNUMBER(nnn)] [NOTE('xxx')] [TOMID(tom ID) | TOMPLEX(tomplex name)] |
The following table describes the parameters:
Parameter | Function |
---|---|
OBJECT | Specify the object name to be locked (mutually exclusive with use of SET parameter). For information about specifying the object name, see Object-and-set-naming-restrictions. |
SET | Specify the set name to be locked (mutually exclusive with use of OBJECT parameter). For information about specifying the set name, see Object-and-set-naming-restrictions. |
HOST | Specify the name of a MVS system that is specified in the object definition’s valid systems list. The HOST parameter is optional. If you do not specify HOST, TOM issues the function on the ACTIVE system. Otherwise, TOM issues the function on the primary system in the VSL. |
DEFBASE | Specify the object definition base where the object or set is stored in the registry. This value is associated with the sysplex keyword value. If it is not specified, the currently active object base is used. |
SYSPLEX | Specify the sysplex associated with the definition base named by the DEFBASE parameter where the object is stored in the Registry. |
CMDNUMBER | When multiple Stop commands are defined for the object, specify the number of the command that the LOCK command will use. If you do not specify the CMDNUMBER keyword, TOM uses the STOP command that is defined by the object's Default Stop Command attribute. |
NOTE | Specify a reason for the action taken. By default this parameter is optional but it is required if you specify OPER_NOTE_REQUIRED=YES in BBPARM member MAMINIxx. If NOTE('xxx') is required but is not specified, the request will be rejected with RC147. Error message MAMOD2035E is written to the log. |
TOMID | Specify the ID of the TOM PAS on which you want the command issued. |
TOMPLEX | Specify the name of the TOMPLEX where you want to issue the function. See Specifying-the-TOMID-and-TOMPLEX-parameters for usage information. |