KEY=VALUE
.
The environment is used for several purposes:
These system environment variables are listed in the
&os2; Command Reference
(CMDREF.INF
) and
are frequently already set at system startup via the
&cfgsys; file.
SET
command.
You can specify environment variables by delimiting the variable
name to the left and right with a percent (%
) sign.
This expression will by dynamically replaced by the command processor
with the value of the variable.
For example, to add a new entry to the current list of directories
in the PATH
variable, you can type
SET PATH=%PATH%;C:\NEWDIR
Using the SETLOCAL command,
you can make a local copy of the environment space, the current
directory, and the current drive, to make temporary changes.
All these settings will be restored with the
ENDLOCAL
command.