SYS_ACT_HOST
Use the SYS_ACT_HOST script function to return the name of the Agent on which a task runs. The script function lets you retrieve the Agent name for the following types of tasks:
-
File and Console Events
Use SYS_ACT_HOST in the Process or Event Process pages.
-
Jobs
Use SYS_ACT_HOST in the Process page.
Syntax
SYS_ACT_HOST ()
Important Considerations
The retrieved Agent is the actual Agent on which the task runs. The Agent may differ from what has been defined in the task properties, because a user or a :PUT_ATT script statement may change the Agent for a particular execution.
More Information:
Examples
The following example assigns a retrieved Agent name to a script variable. The script uses the script variable as a first parameter of the script function GET_FILESYSTEM to count files in a temporary directory:
:SET &HOST# = SYS_ACT_HOST()
:SET &NUMBER# = GET_FILESYSTEM(&HOST#, "c:\temp\*.exe", "PATH_FILE_COUNT")
See also: