#include <qp0z1170.h> int Qp0zDltSysEnv(const char *name, void *reserved);
|
The Qp0zDltSysEnv() function deletes a single system-level environment variable or deletes all system-level environment variables. If the name parameter is NULL, all system-level environment variables are deleted.
The name parameter does not include the equal (=) symbol or the value part of the environment variable name=value pair.
Parameters
Authorities
*JOBCTL special authority is required to delete a system-level environment variable.
Return Value
Error Conditions
If Qp0zDltSysEnv() is not successful, errval indicates one of the following errors.
In attempting to use an argument in a call, the system detected an address that is not valid.
While attempting to access a parameter passed to this function, the system detected an address that is not valid.
A parameter passed to this function is not valid.
The value for the reserved parameter was not NULL.
The directory or a component of the path name specified does not exist.
A named file or directory does not exist or is an empty string.
The parameter name is not NULL and does not point to an environment variable name that currently exists in the environment list.
You must have appropriate privileges or be the owner of the object or other resource to do the requested operation.
You must have *JOBCTL special authority to delete a system-level environment variable.
The operation failed because of an unknown system state. See any messages in the job log and correct any errors that are indicated, then retry the operation.
Related Information
Example
See the example of using Qp0zDltSysEnv() in Qp0zPutSysEnv()--Change or Add a System-Level Environment.
| Top | Environment Variable APIs | APIs by category |
| [Information Center Home Page | Feedback ] | [Legal | AS/400 Glossary] |