Get Environment Variable (QtmhGetEnv) API
Parameters
Required Parameter Group:
1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Length of response Output Binary(4)
4 Request variable Input Char(*)
5 Length of request variable Input Binary(4)
6 Error Code I/O CHAR(*)
The QtmhGetEnv API allows you to get the value set by the server for a particular
HTTP environment variable.
Required parameter group
Receiver variable
OUTPUT:CHAR(*)
The output variable that contains the value set by the server for the requested
environment variable. In CGI input mode %%MIXED%%, this value will be in
CCSID 37; otherwise, it will be in the CCSID of the current job. Note that the
QUERY_STRING in %%BINARY%% mode is not converted by the server.
Length of receiver variable
INPUT:BINARY(4)
The input variable containing the length of the space provided to receive the
environment variables value.
Length of response
OUTPUT:BINARY(4)
The output variable that contains the length of the environment variables
value. When the API is unable to determine the value for the requested
environment variable, the length of the environment variable value is set to
zero. When the size required for the environment variable value is larger than
the length of the receiver variable, the size required to receive the value is
returned.
Request variable
INPUT:CHAR(*)
The input variable containing the desired environment variables name.
Length of request variable
INPUT:BINARY(4)
The input variable containing the length of the desired environment variables
name.
Error Code
I/O:CHAR(*)
Chapter2. Application Programming Interfaces 25