Variables can be changed during execution with step, project,
or permanent scope.
- Step scope: using a command in a step can override variable values
by using explicit assignments. Those values are in effect only during
the current step.
- Project scope: using the .bset command in a step changes the variable
value for the scope of the running job. You can create new variables
using .bset. They are in scope for the remainder of the job. Changes
made using .bset take effect in the step after the step where
.bset is used.
- Permanent scope: using the .set command in a step changes the
environment variable definition. Variables are defined in server environments,
project environments, and step environments. Changing a server variable
or project variable using .set does not change the current job's copy
of the variable. Jobs run after the current job get the changed variable.
However, if a .set command changes a step environment variable, later
steps that use the step environment get the changed variable. The
.set command cannot create new variables.
For example, if you launch a project with a project environment
named Java that includes a variable JavaVersion = 1.4, and you use
.bset to change the value to 1.5, any steps that inherit that project
environment get the value 1.5, while any steps that reference
the Java environment specifically get the original value of 1.4.
Note that when the system starts a job, it copies the project environment
variables to a database record set aside for the job, and refers to
this job environment thereafter when getting project default values.
If the user modifies the starting values of any project variables
when the user starts the job, the values are recorded in the job record.