Send or Save CGI Stateful Data (QzhbCgiSendState_r) API

The QzhbCgiSendState_r() API allows a high availability CGI program to send or save CGI stateful data.

Required Parameter Group:
1 CGI's state string Input Char(*)
2 Length of the string Input Binary(4)
3 Error Code I/O Char(*)

The HTTP Server saves the data for the next request to the stateful CGI so that if a failover occurs the data is available on the backup system (new primary system).

Required parameter group

CGI's state string
INPUT:CHAR(*)

The CGI's state string is the state of a high availability CGI that the Web server stores and passes to the CGI with the subsequent request. This string can consist of any information necessary for the CGI state (for example, a structure of several variables or fields). The Web server treats the contents of the state as binary data.

Length of the string
INPUT:BINARY(4)

The length of the CGI's state. The minimum length is 1 byte and the maximum length is 61,000 bytes.

Error code
I/O:CHAR(*)

The structure in which to return error information. For the format of the structure, see the API error reporting topic in the IBM® i Information Center.

Error messages

CPF24B4 E
Severe Error while addressing parameter list.
CPF3C17 E
Error occurred with input data parameter.
CPF3CF1 E
Error code parameter not valid.