Getenv$
getenv$
allows you to read an environment variable as given in the service definition if Sage X3 runs on Windows, and given by assignments in the script that starts the daemon for Sage X3.
getenv$
always gives the value on the process server.
getenv$(EXP_ENVVAR)
EXP_ENVVAR
is a string expression that gives the environment variable name. # What is the HOME directory ?Local Char HOME_DIR(200)HOME_DIR=getenv$("HOME")# What is the PATH on the process server ?Local Char PATH_VAR(250)PATH_VAR=getenv$("PATH")
getenv$
allows you to get the value of environment variables in the context of the server process.
If the variable does not exist, the empty string " " is returned.
The most frequently environment variable are : PATH
, TMPDIR
, SHELL
, LOGNAME
, and HOME
.
VARIABLE=valueexport VARIABLE
Error code | Description |
---|---|
10 | The argument is not a string. |