SYS_USER_DEP

Use the SYS_USER_DEP script function to retrieve the department of the user who started the task. For example, if the user is SMITH/DEV, the script function returns the string DEV. Tasks can be started manually, with the ACTIVATE_UC_OBJECT script function, or through Workflow or Schedule objects. If the task that calls SYS_USER_DEP belongs to a Schedule object, the script function returns the department of the user who started the Schedule object.

Tip: You can also find information about the user in the execution lists. For more information, see Execution Data.

Syntax

SYS_USER_DEP ()

Return Codes

The script function returns the department of the user.

Examples

The following example retrieves the department used to log on and writes the result to the activation report.

:SET &LOGDEP# = SYS_USER_DEP ()

:PRINT "Login information: The user department is &LOGDEP#."

See also: