:REGISTER_VARIABLE
Use the script statement :REGISTER_VARIABLE to register the name and the value of a variable in the AE system. You can do so in the Process Pages of any JOBS object for Windows or UNIX. The registered variables are stored as object variables (see Variables Page). You can use :REGISTER_VARIABLE in the context of external interpreter script sections.
Important! Variables that are registered with :REGISTER_VARIABLE are limited to 1023 characters. Variables that are longer are truncated to 1023 characters without notice.
Syntax
:REGISTER_VARIABLE Variable name, Variable value
-
:REGISTER_VARIABLE
Registers the name and the value of a variable -
Variable name
Name of the variable
Format: Name of the variable without a leading ampersand (&) character. End with a hashtag (#). -
Variable value
Value of the relevant variable
Format: String
Example
The following Windows example stores the variable FOO with the value of the date, which was set at runtime.
date /T > tmp.txt
set /p FOO=<tmp.txt
:REGISTER_VARIABLE FOO#, %FOO%
Using External Interpreter Scripts
You can use :REGISTER_VARIABLE inside of a :BEGIN_EXT_INTERPRETERS... :END_EXT_INTERPRETERS block to store the value of a user-defined variable while executing an external interpreter script.
Important!
To be able to use :REGISTER_VARIABLE with external interpreter scripts, the administrator must define the required external interpreters in
- the supplied Include objects (see Configuring Include Objects for External Interpreter Calls)
- the settings for Window or UNIX external interpreters
For more information, see UC_EXT_INTERPRETERS_* - Register External Interpreters.
When you define an external interpreter, you must copy the Include object REGISTER_VARIABLE.WINDOWS or REGISTER_VARIABLES.UNIX to your target client. The Automation Engine then uses your version and does not overwrite it when delivering new initial data. The following example shows a call for PERL:
:if &$EXT_INTERPRETER# = 'PERL' or 'perl' or 'Perl'
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
...
:endif
See also: