#include <qp0z1170.h>
int Qp0zGetSysEnv(const char *name,
char *value, int *value_size,
int *ccsid, void *reserved);
|
The Qp0zGetSysEnv() function gets the value of a system-level environment variable name by searching the system-level environment variable list for a string of the form name=value. The value and the coded character set identifier (CCSID) associated with the environment variable name are returned.
Authorities
None
Parameters
Return Value
Error Conditions
If Qp0zGetSysEnv() 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.
No entry found for name specified.
The requested operations required additional space on the device and there is no space left. This could also be caused by exceeding the user profile storage limit when creating or transferring ownership of an object.
Insufficient space remains to hold the intended file, directory, or link.
The size of the value buffer was not big enough to receive the value.
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.
Usage Notes
Related Information
Example
See the example of using Qp0zGetSysEnv() 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] |