Guardian C Library Calls Reference Manual

Reference to Library Calls
Guardian TNS C Library Calls Reference Manual128833 3-145
putenv
putenv
The putenv function sets the value of a run-time parameter from the environment array.
env_parm
points to a string of the form name=value. name is the run-time parameter to set and
value is the value to set the parameter to. This string must be in uppercase. Possible
values for *env_parm are described under “Usage Guidelines.
Return Value
is zero if putenv is successful
Usage Guidelines
The environment array always contains the following four run-time parameters, as
you would specify them in *env_parm:
In addition to these four parameters, the environment array contains values for all
user-defined parameters (PARAMs) active when your C program starts.
To use this routine, you must specify the _XOPEN_SOURCE feature test macro for
the header file stdlibh.
If the main routine of a mixed-language program is not written in C, the value of the
SAVE-ENVIRONMENT PARAM must be set to ON to use the putenv function.
Refer to the Common Run-Time Environment (CRE) Programmer’s Guide for more
information.
#include <stdlibh>
int putenv(const char *env_parm);
"STDIN"
Gives the file name of the standard input file stdin.
"STDOUT"
Gives the file name of the standard output file stdout.
"STDERR"
Gives the file name of the standard error file stderr.
"DEFAULTS"
Gives the default volume and subvolume names used to qualify
partial file names.