.set env <EnvGroupName>[(SnapshotName)] "<VariableName>=<DesiredValue>" [...]
The
.set command assigns a value to an environment
variable. You can specify additional variables and values. Enclose
each variable and its value in quotes. This command sets the variable
for the default snapshot for the environment group unless you specify
a snapshot. If you specify a snapshot, enclose it in parentheses with
no space between the environment group name and the snapshot name.
Note: Variables
set by this command must already exist.
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, stores the copy in
the job records, and uses that copy as the project default.
When a step runs, it uses the job copy of the environment, not
the master record. Therefore, using .set has the
following effects:
- When a .set command runs in a step, later steps
that use the default step environment do not see the
changes. The system uses the job copy of the default environment for
the step.
- When a .set command runs on a specified environment,
later steps that specify that environment see the changes you made.
The system reads the master record for the environment when the step
specifies an environment. This is true even if the specified step
environment is the same environment as the project default.
- Changes made by a .set command persist after
a job is over. Future runs use the values created by previously run .set commands.
For more information about using this command, see Working with job data.
Also see the similar command .bset.