Where allowed to run: All environments (*ALL) Threadsafe: Yes |
Parameters Examples Error messages |
The Remove Environment Variable (RMVENVVAR) command removes an environment variable (or all environment variables) that exists.
Restriction: You must have *JOBCTL special authority to use this command to remove system-level environment variables.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
ENVVAR | Environment variable | Character value, *ALL | Required, Positional 1 |
LEVEL | Level | *JOB, *SYS | Optional |
Top |
Specifies the name of the environment variable to be removed. If an environment variable by this name does not exist at the specified level (LEVEL parameter), error message CPFA981 is issued.
If the special value of *ALL is specified, then all environment variables at the specified level (LEVEL parameter) are removed.
Note: The case is preserved when lowercase characters are specified.
If an apostrophe is intended, two apostrophes must be used ('').
This is a required parameter.
Top |
Specifies the level of the environment variable.
The possible values are:
Top |
Example 1: Remove a Job-level Environment Variable
RMVENVVAR ENVVAR(altdir)
This command removes the job-level environment variable named altdir.
Example 2: Remove a System-level Environment Variable
RMVENVVAR ENVVAR(home) TYPE(*SYS)
This command removes the system-level environment variable named home.
Example 3: Remove All Job-level Environment Variables
RMVENVVAR ENVVAR(*ALL)
This commands removes all job-level environment variables.
Example 4: Remove All System-level Environment Variables
RMVENVVAR ENVVAR(*ALL) LEVEL(*SYS)
This commands removes all system-level environment variables.
Top |
*ESCAPE Messages
Top |