Sample Collection Guide > How to Use an External Interpreter

How to Use an External Interpreter

In order to use external interpreters in the Automation EngineThis component drives an Automation Engine system and consists of different types of server processes., you have to configure the relevant system variables and use the scriptA particular Automation Engine object type. element appropriate. The following document describes this using the example of the Perl programming language.

Define an External Interpreter

An external interpreter can be defined in the following variables in clientA closed environment within an Automation Engine system where you can create and run objects. A client name consists of a 4-digit number that must be indicated when a user logs on to the Automation Engine system. Users and their rights are also defined in clients. A particular Automation Engine object type. 0000:

These interpreters are available to all clients.

The image below shows the UC_EXT_INTERPRETERS_WINDOWS and _UNIX system variables respectively (in the front UC_EXT_INTERPRETERS_UNIX, Variable tab):

 

Invoke an External Interpreter

The following example invokes a piece of Perl script using the PERL interpreter (use in the Process tab of a Job objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task):

:BEGIN_EXT_INT PERL

 

  printf("*** Hello World from Perl! *** \n");

  @files = qx|dir c:\\*.txt |;

  print @files;

 

:END_EXT_INT PERL

The above script results in a call like the following:

perl {Path to agent directory}\Resources\{client number}\{runid}\{runid}_0001.pl

where the Perl file {runid}_0001.pl contains the content of the script block.

If multiple :BEGIN_EXT_INT blocks are used, the number counter will differentiate the generated files.

Comments

Automic script variables can be mixed with native script.

Return a Variable

Define the external interpreter scripts in the system variables REGISTER_VARIABLE.WINDOWS and REGISTER_VARIABLE.UNIX (Job Includes) respectively.

Inside a :BEGIN_EXT_INT and :END_EXT_INT block, the script statement :REGISTER_VARIABLE will reportA report provides more detailed information about a task's execution or a component. a string value back to an Automic variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. in AE.
Then, any script following the block can use that variable.

Example

:REGISTER_VARIABLE"Perl", "Hello World from Perl!"

This does work, if you define the external interpreter and the variable in the Process tab of a Job object.

However, should you use a script attached as binary to a Storage object, a variable configured using :REGISTER_VARIABLE would not be usable by the AE system, as the script binary will be transferred to the agentA program that enables the de-centralized execution of processes (such as deployments) on target systems (computers or business solutions) or a service that provides connectivity to a target system (such as for databases or middleware). An agent is also an object type in the Automation Engine. [Formerly called "Executor."] See also: host directly.

 

See also:

 

 

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH