You can use the .set, .bset, and .tset commands to change an environment
variable from within a step. These commands change the values of existing
environment variables as follows:
- Use the .set command to change the master record for an
environment. When the system runs a project, it makes a copy of the
project environment from the master record, and uses that copy as
the project default. This has the following effects:
- If a .set command modifies the project environment, later steps
that use the default environment do not see the changes, because
the system does not refer back to the master record.
- If you use a .set command to modify an environment and a later
step explicitly uses the same environment, that step will see the
changes you made. The system goes back to the master record for the
environment when the step has a specific environment selected. This
works even if the named group is the same as the project default group,
so long as the step's environment setting is not "Default."
- Changes made by a .set command persist after a job is over. Future
jobs use the values created by previously run .set commands.
Use the following basic syntax: .set env <EnvGroupName>[(<SnapshotName>)] "<VariableName>=<DesiredValue>"
- Use the .bset command to add or change variable values during
job execution. Changes take effect in the step after the step .bset
appears in. They are in effect for the remainder of the job.
.bset env "<VariableName>=<DesiredValue>"
Note: Unlike the .set command, the variable you specify
for a .bset command does not have to exist when you set it, so you
can use the .bset command to create a new variable during a job. The
value of the variable does not persist past the current job.
- Use the .tset command to add or change variable values during
job execution. Changes take effect in the current step. They are in
effect for any other commands in the step and for any Inline specified
for the step. The value of the variable does not persist past the
current step.
.tset env "<VariableName>=<DesiredValue>"
Note: Unlike
the .set command, the variable you specify for a .tset command does
not have to exist when you set it, so you can use the .tset command
to create a new variable during a job.