:BEGIN_EXT_INTERPRETERS... :END_EXT_INTERPRETERS
The :BEGIN_EXT_INTERPRETERS and :END_EXT_INTERPRETERS script statements define the start and end of an external interpreter script on the Process page of Windows and UNIX Job objects. You must register the relevant interpreters in the respective UC_EXT_INTERPRETERS_WIN and UC_EXT_INTERPRETERS_UNIX system variables.
Important! If a Job object is part of a Workflow, the Workflow's script entries override the scripts used on the Process page of the Job object (JOBS).
Tip: Use the :REGISTER_VARIABLE script statement to store return values or data in user-defined variables.
Syntax
:BEGIN_EXT_INT[ERPRETERS] Key
External Interpreter Script
:END_EXT_INT[EPRETERS] Key
Parameters
| Parameter | Description |
|---|---|
| Key |
Interpreter key as defined in UC_EXT_INTERPRETERS_WINDOWS or UC_EXT_INTERPRETERS_UNIX. For more information, see UC_EXT_INTERPRETERS_* - Register External Interpreters. |
| External Interpreter Script |
Contains the script to execute using the external interpreter. The script format depends on the called external interpreter. You can use multiple external interpreter scripts, regardless of whether they use the same or different external interpreter types. Ensure that the scripts do not cascade or overlap. |
Examples
The following example shows a Perl script that transfers a resource file (a Perl library) from the database to the agent. It then constructs the file path, includes the transferred file, and calls a function from the library to calculate and print a result.
! Transfer resource file (Perl library) from DB to agent
:ATTACH_RES "STORE_LIB", "FUNC1", C
! Prepare resource file path string
:SET &cachepath# = STR_SUB("&$AGENT_RESOURCES_CLIENT#", "\", "\\")
:SET &funcfile# = STR_CAT(&cachepath#,"func.pl")
:BEGIN_EXT_INTERPRETERS perl
# include transferred file
require "&funcfile#";
# Call function "myadd" of library file and print out result
my $val1 = 10;
my $val2 = myadd($val1);
print "calculated via lib function = $val2";
:END_EXT_INTERPRETERS perl
See also: