CRE Programmer's Guide
CRE Service Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
6-3
CRE_Putenv_
name-value
is a null-terminated string that contains the name of an environment variable
followed by an equal sign (=), followed by the value to store in the specified
environment variable, as follows:
name=value
For example, the following string in name-value, stores the string “ABCDEFGH”
in the environment variable “ALPHABET”:
ALPHABET=ABCDEFGH0
where the zero (0) is a null byte that terminates the name-value string.
The syntax for the native CRE environment is:
Var_string
is a null-terminated string that contains the name of an environment variable
followed by an equal sign (=), followed by the value to store in the specified
environment variable, as follows:
Var=string
For example, the following string in Var_string, stores the string “ABCDEFGH”
in the environment variable “ALPHABET”:
ALPHABET=ABCDEFGH0
where the zero (0) is a null byte that terminates the Var_string string.
Return Value
CRE_Putenv_ returns one of the following:
•
0 if CRE_Putenv_ is successful
•
A negative number, which is the negation of a CRE error number from the following
table:
Considerations
CRE_Putenv_ corresponds to the C language putenv() function.
INT(32) PROC CRE_PUTENV_=”putenv”( Var_string )LANGUAGE C;
STRING .EXT Var_string; ! in, required
EXTERNAL; ! native only
Error Code Cause
31 Cannot obtain data space