Qp0zDltSysEnv()--Delete a System-Level Environment Variable


  Syntax
 #include <qp0z1170.h>

 int Qp0zDltSysEnv(const char *name, void  *reserved);  
  Service Program Name: QP0ZSYSE

  Default Public Authority: *USE

  Threadsafe: Yes

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

name
(Input) The name of the environment variable to delete.
reserved
(Input) Reserved for future use. Currently, the only value allowed is NULL.

Authorities

*JOBCTL special authority is required to delete a system-level environment variable.


Return Value

0 Qp0zDltSysEnv() was successful.
errval Qp0zDltSysEnv() was not successful. errval is set to indicate the error.


Error Conditions

If Qp0zDltSysEnv() is not successful, errval indicates one of the following errors.

[EFAULT]

The address used for an argument is not correct.

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.

[EINVAL]

The value specified for the argument is not correct.

A function was passed incorrect argument values, or an operation was attempted on an object and the operation specified is not supported for that type of object.

An argument value is not valid, out of range, or NULL.

The value for the reserved parameter was not NULL.

[ENOENT]

No such path or directory.

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.

[EPERM]

Operation not permitted.

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.

[EUNKNOWN]

Unknown system state.

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 Variable.



API introduced: V4R4

[ Back to top | UNIX-Type APIs | APIs by category ]