Environment Variable APIs

Environment variables are character strings of the form "name=value". There are two types of environment variables:

When a job calls one of the job-level environment variable APIs or CL commands for the first time, it inherits the system-level environment variables onto its job-level environment space. Any changes to job-level and system-level environment variables are then independent of one another.

The temporary space where the job-level environment variables are stored allows read and write access. Therefore, it is possible for the space to be corrupted. This could occur if a programmer accesses the space directly using the environ array rather than using the environment variable APIs. If the space is corrupted, subsequent calls using the APIs will have unpredictable results.

The environment variable APIs are:

Note: These functions use header (include) files from the library QSYSINC, which is optionally installable. Make sure QSYSINC is installed on your system before using any of the functions. See Header Files for UNIX®-Type Functions for the file and member name of each header file.


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