SET_SYNC

Use the SET_SYNC script function to execute an action defined in a Sync object. The task that contains the script calls the Sync object and, if the condition specified in the Sync object is met, carries out the action. For more information, see Sync (SYNC).

Note You need write access (W) to the specified Sync object to execute SET_SYNC. For more information, see Granting Automation Engine Authorizations.

Syntax

SET_SYNC (Sync, Action)

Parameters


Return Codes

The script function has the following return codes:

Whether or not an action can be executed depends on the condition specified in the Sync object. Each action can only be executed when a particular condition is met.

Example

A sync object that is called DB.STATUS includes an action that is called EXCLUSIVE. A task contains the following script, which attempts to execute the EXCLUSIVE action. Depending on whether the condition for the action is met, the action is carried out. The script prints a message about the success or failure to execute the action in the activation report of the task.

:SET &RET#=SET_SYNC("DB.STATUS","EXCLUSIVE")
:
IF &RET# = "Y"
:   
PRINT "Sync condition EXCLUSIVE was set!"
:
ELSE
:   
PRINT "Sync condition EXCLUSIVE was not set!"
:
ENDIF

See also:

seealso

Sync (SYNC)