ScriptEigener Objekttyp in der Automation Engine Statement: Assigns a value to a script variable.
Syntax
:S[ET] Script variable = Value
Syntax |
Description/Format |
---|---|
Script variable |
The name of the script variable to which a value should be supplied. A script variable's name is limited to 32 alphanumeric characters, including the special characters "$", "_", "@", "ยง" and "#". German Umlauts are not allowed. The first character must not be a number. Variables within the script must always specified with a leading "&" following the variable name! Format: script variable |
Value |
The value that should be assigned to the script variable. |
Comments
Refer to the document that describes the peculiarities and practical usage of script variables.
When the specified variable does not yet exist, it will newly be created. In this case, the variable does not have a specific data type.
You can also use this script element to solve arithmetic expressions. For more information, see Calculations.
When predefined variables that are enclosed in parentheses are used as values and supply numerical values (such as &$CLIENT#), they will automatically be converted to the 16-digit default format.
When you assign :SET and :RSET statements the same script variable with different values, their values will be set by those :SET and :RSET statements when the job is executed. However, if the job is restarted, the values of both variables will be set by the :SET statement. This is because :RSET statements automatically create object values and :SET statements automatically save the value for a restart. This is a change in behavior from v8, where :RSET statements did not create object values.
It is possible to redefine variables with :DEFINE that are already defined by :SET.
Examples
The example assigns a file name to the script variable "&FILE".
:SET &FILE# = "L.LST.FILE"
In the following example, the current date - which is retrieved using a script function - is assigned to the script variable "&TODAY".
:SET &TODAY# = SYS_DATE(YYMMDD)
A script variable can also include numbers.
:SET &NUMBER# = 1
You can also assign a value of a different script variable.
:SET &NR# = &NUMBER#
See also:
Script element | Description |
---|---|
:DEFINE | Declares a script variable with a particular data type. |
Assigns a value to an object variable. |
|
Assigns a value to a script variable and saves it to the activation report. |
|
Sets the values of script variables by indirect access. |
Script Elements - Script Structure and Processing
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by function