You can use the .set and .bset commands to change an environment variable from within a step. These commands change the values of existing environment variables as follows:
The .set command changes 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 which 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.
.set env <GroupName> "<VariableName>=<DesiredValue>"
.bset env "<VariableName>=<DesiredValue>"
.tset env "<VariableName>=<DesiredValue>"