Script Function: Checks whether a user is logged on to AE with a UserInterface.
SYS_USER_ALIVE(Name, Department)
Syntax |
Description/Format |
---|---|
Name |
Name of the user. |
Department |
User's departmentDepartment name to which the Automation Engine user belongs.. |
Return codes |
---|
"Y" - The user is logged on to the
UserInterface. |
This script function checks if a user is logged on to AE.
Name and Department identify a user (for example, SMITH/DEV). You can only check users of your own client.
Users who are logged on via a utility or Call Interface cannot be identified .
The script function returns "N" if the user is not logged on or if the User object does not exist in the current client. If the specified user does not exist, you can react to this error by using the script statement :ON_ERROR and analyze it by using the script functions for error handling. Depending on the settings that have been specified, script processing either continues or aborts.
The following example checks whether a user has logged on to DEV. The user's name and department are passed on to the script function in the form of script variables. The script aborts if the user "SMITH/DEV" is not defined. The result is output to the activation protocol.
:ON_ERROR ABEND
:SET &USR# = "SMITH"
:SET &DEP# = "DEV"
:SET &RET# = SYS_USER_ALIVE(&USR#, &DEP#)
:PRINT
&RET#
See also:
Script element | Description |
---|---|
Supplies the department of the user who has started the task. |
|
SYS_USER_LANGUAGE | Supplies the language in which the Server generates the log files. |
SYS_USER_LNAME | Supplies the first and last name of the user who has started the task. |
SYS_USER_NAME | Supplies the name of the user who has started the task. |
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function