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).

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 (SyncAction)

Parameters

Parameter Description Format Allowed Values
Sync Name of the Sync object. AE name, script literal, or script variable n.a.
Action Action to execute. AE name, script literal, or script variable n.a.

Return Codes

The script function has the following return codes:

  • Y: The sync action has been executed.
  • N: The sync action could not be executed.

Actions only execute when they meet the specific conditions defined within the Sync object.

Examples

The following script attempts to execute the EXCLUSIVE action defined in the DB.STATUS Sync object. If the action's condition is met, it runs, and the script logs a success or failure message in the task's activation report:

: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)