# Retrieve envvar into envdef > [HTML Version](retrieveenvvarintoenvdef.htm) **xcall CGIUTL, CGIOP\_GETENV, envvar, envdef, status** _Opcode_ 5, CGIOP\_GETENV, retrieves the contents of the environment variable _envvar_ into the string variable _envdef_. **Parameters** _envvar _([String](string.htm.md)) \[in\] name of the environment variable to query, e.g. "CONTENT\_LENGTH" _envdef_ ([String](string.htm.md)) \[out\] value of the specified environment variable, or null if _envvar_ not defined _status_ ([Num](num.htm.md)) \[out\] _status_ will be set to 0 for OK, or 1 if the variable had to be truncated to fit in _envdef_.