Put environment variable with CCSID (QzsrPutEnvCCSID) API

Important: Information for this topic supports the latest PTF levels for HTTP Server for i5/OS . It is recommended that you install the latest PTFs to upgrade to the latest level of the HTTP Server for i5/OS. Some of the topics documented here are not available prior to this update. See http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm Link outside Information Center for more information.
Required parameter group:
Environment string Input Char(*)
Lenth of environment string Input Binary(4)
CCSID of environment string Input Binary(4)
Error code I/O Char(*)

The QzsrPutEnvCCSID API allows you to set or create a job-level environment variable. This is useful for communication between programs running in the same job, such as your program and the Net.Data® language environment DTW_SYSTEM. CCSID support allows you to specify the encoding of the environment string.

Required parameter group

Environment string
INPUT:CHAR(*)

The input string of the form: envVar=value. Where envVar is the name of the new or existing environment variable, and value is the value you want to set the environment variable. They are both case sensitive. The API expects this value to be in the CCSID of the environment string.

Length of environment string
INPUT:BINARY(4)

The input variable that contains the length of the environment string parameter (without trailing blanks). For example, the length of the environment string envVar=value is twelve.

CCSID environment string
INPUT:BINARY(4)
The CCSID to be used for the encoding of the environment string. The valid values for this parameter are:
  • 0 : The CCSID of the environment string.
  • 1-65533 : A valid CCSID in this range must be specified or an error is returned.
Error code
I/O:CHAR(*)

The structure in which to return error information. Error messages are added to the error log or script log except for those listed below. For the format of the structure and for details on how to process API errors, see the API error reporting topic in the iSeries™ Information Center.

Error messages

CPF24B4 E
Severe error while addressing parameter list.
CPF3CF1 E
Error code parameter not valid.
Note: The Environment Variable APIs provide the putenv() (Put Value in Environment Variable) function necessary to set (or create and set) an environment variable. Programs that need CCSID conversion support for environment variables should use the QzsrPutEnvCCSID() API. See also Get environment variable with CCSID (QzsrGetEnvCCSID) API.