GET_SYNC

Use the GET_SYNC script function to retrieve the current settings of a Sync object. You can find these settings in the Attributes page of the object as well.

Syntax

GET_SYNC (Sync, Type)

Parameters

  • GET_SYNC
    Retrieves the current condition or value of a Sync object

  • Sync
    The name of the Sync object whose current condition or value should be retrieved
    Format: AE name, script literal or script variable

  • Type
    Defines whether the current condition or the current value should be determined
    Format: AE name, script literal or script variable
    Allowed values:

    • STATE
      Current condition
    • VALUE
      Current value

Return codes
This script function returns the following values:

  • The current condition of the Sync object
  • The current value of the Sync object.

Example

:SET &ADMIN# = GET_SYNC("DB.STATE","STATE")
:
IF &ADMIN# = "EXCLUSIVE"
:
 PRINT "The administrator job is currently exclusively using the database."
:
ENDIF


:
SET &RET# = GET_SYNC("DB.STATE","VALUE")
:
IF &RET# = 0
:   
PRINT "No job is currently using the database."
:
ELSE
:   
PRINT "&RET# jobs are currently using the database."
:
ENDIF

See also:

seealso

Sync (SYNC)