Configuring Include Objects for External Interpreter Calls

The REGISTER_VARIABLE.WINDOWS and REGISTER_VARIABLE.UNIX Include objects are used to define external interpreters as well as variables and their values, which can then be called from Job objects.

The variable definitions you set here are called by the :REGISTER_VARIABLE script statement that you can use with Windows and UNIX Job objects.

If you intend to use external interpreter scripts in a Windows or UNIX Job object, you must use them with the :BEGIN_EXT_INTERPRETERS... :END_EXT_INTERPRETERS script element on the Process Page of the Job object definition.

These two objects are available on the system client 0000 only and should be configured by the administrator. Their settings will be available system-wide.

Take into account that the settings for these Include objects in any other client within the system will have priority in that particular client.

Make sure that you copy the REGISTER_VARIABLE.WINDOWS and REGISTER_VARIABLE.UNIX Include objects from the system client REGISTER folder into the same folder in any other client of the Automation Engine system before you adapt them to your needs. After delivery of new initial data by Automic, the Include objects in the system client are overwritten with the default data

The two Include objects may be used as other Include objects in the Automation Engine.

Default Script for Windows

The REGISTER_VARIABLE.WINDOWS Include object is delivered with the following default script:

:set &uc_register_varname = sys_last_registered_varname()
:set &uc_register_valuename = sys_last_registered_valuename()
:set &uc_register_otype# = sys_act_me_type()
:if &uc_register_otype# = 'JOBS'
: set &uc_windows_typ = get_att(win_typ)
: IF &UC_WINDOWS_TYP = "BAT"

&UC_JOBMD JNR=&UC_REALNR MNR=&UC_MANDANT PNR=&UC_IP_PORT IPA=&UC_IP_ADR TYP=V VTYPE=T NAME=&uc_register_varname VALUE=&uc_register_valuename
: ENDIF
!:DATA @set retcodemsg=%errorlevel%
!:DATA @set retcode=0
!:DATA @if NOT %retcodemsg% == 0 GOTO :MSGABORT
: ENDIF
:endif

Example: Perl as external interpreter on Windows

If you want to use Perl as an external interpreter on Windows, you would enter the following script in the default script above between the :IF and :ENDIF statements defining the &UC_WINDOWS_TYP variable:

: IF &$EXT_INTERPRETER# = 'PERL'
: SET &UC_PATH_JOBMD# = STR_SUB("&UC_JOBMD", "\", "\\")
system("&UC_PATH_JOBMD# JNR=&UC_REALNR MNR=&UC_MANDANT PNR=&UC_IP_PORT IPA=&UC_IP_ADR TYP=V VTYPE=T NAME=&uc_register_varname
VALUE=&uc_register_valuename");
: ELSE

Default Script for UNIX

The REGISTER_VARIABLE.UNIX Include object is delivered with the following default script:

:set &uc_register_varname = sys_last_registered_varname()
:set &uc_register_valuename = sys_last_registered_valuename()
:set &uc_register_otype# = sys_act_me_type()
:if &uc_register_otype# = 'JOBS'
&UC_JOBMD JNR=&UC_REALNR MNR=&UC_MANDANT PNR=&UC_IP_PORT IPA=&UC_IP_ADDR TYP=V VTYPE=T NAME=&uc_register_varname VALUE=&uc_register_valuename
:endif

See also: