Required Parameter Group: | |||
1 | Command string | Input | Char(*) |
2 | Output format | Input | Char(8) |
3 | Target Buffer | Output | Char(*) |
4 | Length of Target Buffer | Input | Binary(4) |
5 | Length of response | Output | Binary(4) |
6 | Error Code | I/O | Char(*) |
Use QzhbCgiParse API to parse the QUERY_STRING environment variable, in the case of the GET method, or standard input, in the case of POST method, for CGI scripts. If the QUERY_STRING environment variable is not set, the QzhbCgiParse API reads the CONTENT_LENGTH characters from its input. All return output is written to its standard output.
You can only call QzhbCgiParse once for the POST method. To use this API with the POST method, you would first want to read all of stdin and assign it to the QUERY_STRING environment variable. You would then change the environment variable REQUEST_METHOD to GET.
This API does not work with the %%MIXED%% CGI input mode.
The command string is a null ended string for flags and modifiers. At least one space must separate each flag. There is a one-character equivalent for each flag. The following flags are supported:
The format of the data to be returned in the target buffer. You must use one of the following format names:
This is output buffer that contains the information requested by the command string (if any).
The length of the target buffer provided to receive the API output.
The actual length of the information returned in the target buffer.
The structure in which to return error information. 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.
Offset Decimal | Offset Hexadecimal | Type | Field |
---|---|---|---|
0 | 0 | Binary(4) | Bytes returned |
4 | 4 | Binary(4) | Bytes available |
8 | 8 | Char(20) | Continuation handle |
28 | 1C | Binary(4) | Offset to first variable entry |
32 | 20 | Binary(4) | Number of variable entries returned |
36 | 24 | Char(*) | Reserved |
Binary(4) | Length of variable entry (see note below) | ||
Binary(4) | Length of variable name (see note below) | ||
Char(*) | Variable name (see note below) | ||
Binary(4) | Length of variable value (see note below) | ||
Char(*) | Variable value (see note below) | ||
Char(*) | Reserved (see note below) |