Variables
The variable Property page can be used to assign a variable value and determine whether the variable is a static text value or a derived Expression variable.
An Expression variable can contain date formats so the variable is updated as time changes. This is an example of a date variable.
.png)
To change a variable to an expression
Right click on the variable name in the EnterpriseSCHEDULE Explorer or on the variable in a layout.
2.Choose Properties from the menu.
3.Select Expression from the Type dropdown.
4.Edit the Description and/or value of the variable.
5.Click on the OK button to save the change.
Click on Apply to see the current value of the expression. If the expression is a Date Expression, the value will be based on the current time on the server.
For more on Expression variables see the EnterpriseSCHEDULE User's guide.
The purpose of a variable is to allow job switching and wait state controls that go beyond the traditional prerequisites and initiates. Variables are evaluated or set at the time the job is submitted. They can be used to determine job switching in resource statements, set in a resource (or end action) statement, or inserted anywhere in a command list using preprocessor syntax of enclosed double parentheses.
There are four types of variables in EnterpriseSCHEDULE.
1.String variables: Any alphanumeric string can be used as a variable.
2.Temporary variables: Temporary variables only hold value for the duration of the job run. They include time settings, job parameters and job information. Temporary variables begin with a $.
3.Expression Variables: EnterpriseSCHEDULE supports a rich set of enhanced variable expressions that feature simple or complex math expressions, date expressions and string expressions. This extends the power of variables and allows for run time calculation of dates and other values.
4.Job Variables: Job variables are stored within a job and are accessible only within that job unless they are explicitly included in other jobs. For more, see Job Variables.
There are several places where variables can be accessed in a job:
1.Resource or End Actions: Used in a resource statement, variables can be compared with each other or with a constant to determine job switching or set using the set command
2.Command Lists: Using the preprocessing syntax of enclosed double quotes (e.g. (( Myvar )) ), the variables value can be placed anywhere in a command list. This is especially useful for inserting date expressions that can change depending on when the job is submitted.
3.Notices text: Using the preprocessing syntax of enclosed double quotes, the variables value can be placed anywhere in a notices list. This is especially useful for inserting date expressions that can change depending on when the job is submitted.
A variable's value is stored in the database where it can be accessed or modified with the SET command when a job's resources or end actions are evaluated. Variables can also be created or modified on the command line or in the EnterpriseSCHEDULE Windows Client. EnterpriseSCHEDULE supports a rich set of enhanced variable expressions that feature simple and complex math expressions, date expressions and string expressions. This extends the power of variables and allows for run time calculation of dates and other values. In the EnterpriseSCHEDULE Windows Client, variables may be edited in the Layout or the Explorer. The edit screen for the properties of String variable is shown below: