Receive CGI Stateful Data (QzhbCgiRecvState) 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:
1 Target buffer Output Char(*)
2 Length of target buffer Input Binary(4)
3 Length of response Output Binary(4)
4 Continuation handle I/O Char(*)
5 Error Code I/O Char(*)

Use the QzhbCgiRecvState API with HA CGI programs to receive the CGI stateful data. The HTTP Server receives 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). This API is used with API QzhbCgiSendState.

Required parameter group

Target buffer
OUTPUT:CHAR(*)

The target buffer containing the state of a high availability CGI program.

Length of target buffer
INPUT:BINARY(4)

The length of the target buffer that receives the API output. The minimum length is 1 byte and the maximum length is 61,000 bytes.

Length of response
OUTPUT:BINARY(4)

The length of response is the actual length of the information that is returned from the target buffer. If this value is greater than the length of the target buffer, then there is more state to read. The difference between these two values represents the amount of bytes the caller should read in subsequent calls to this API.

Continuation handle
I/O:CHAR(*)

The continuation handle is the handle that is returned when more data is available to return, but the target buffer is not large enough. The caller must pass this handle to this API on subsequent calls as it was received from the previous call. On the first call to this API, the continuation handle must be set to 0 (equivalent to NULL in C). The caller must not allocate, deallocate, or modify the continuation handle. This field is set to 0 when all information is returned.

Error code
I/O:CHAR(*)

The structure in which to return error information. For the format of the structure, see API Error Reporting in the iSeries™ 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.
HTP4005 E
Highly Available CGI invoked QzhbCgiRecvState() after it had already received the entire state.
HTP4006 E
QzhbCgiRecvState() was called when there was no state.