#include <qp0z1170.h> char *Qp0zGetEnv(const char *name, int *ccsid);
|
The Qp0zGetEnv() function is an OS/400 extension to the standard getenv() function. Qp0zGetEnv() searches the job-level environment list for a string of the form name=value. The value and the CCSID (coded character set identifier) associated with the environment variable name are returned.
Parameters
Return Value
Error Conditions
If Qp0zGetEnv() is not successful, errno indicates one of the following errors.
A referenced object is damaged. The object cannot be used.
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.
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 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 getenv() in putenv()--Change or Add Environment Variable.
| Top | Environment Variable APIs | APIs by category |
| [Information Center Home Page | Feedback ] | [Legal | AS/400 Glossary] |