This topic provides information about IBM® HTTP Server for i APIs for CGI applications.
HTTP Server supports the APIs listed below in C++, REXX, ILE C, ILE COBOL, and ILE RPG programming languages. Although all APIs are supported in all of these languages, most ILE C CGI applications will only need to use QtmhCvtDB(), QzhbCgiParse(), or QzhbCgiUtils(). This is because ANSI C can work with stdin, stdout, and environment variables directly. ILE C CGI applications use ANSI C function calls to work with stdin, stdout, environment variables, and string functions for parsing stdin and environment variable data.
To use these APIs in a CGI application, you must bind the CGI program to *SRVPGM QZHBCGI in library QHTTPSVR. ILE C programs must include header file QSYSINC/H(QZHBCGI). CGI application programs must be written and compiled in Integrated Language Environment® ILE C, ILE RPG, and ILE COBOL.
- Get Environment Variable (QtmhGetEnv) API
- Put Environment Variable (QtmhPutEnv) API
- Read from Stdin (QtmhRdStin) API
- Write to Stdout (QtmhWrStout) API
- Convert to DB (QtmhCvtDB) API
- Parse QUERY_STRING Environment Variable or Post stdin data (QzhbCgiParse) API
- Produce Full HTTP Response (QzhbCgiUtils) API
- Send or Save CGI Stateful Data (QzhbCgiSendState_r) API
- Receive CGI Stateful Data (QzhbCgiRecvState_r) API
- Put environment variable with CCSID (QzsrPutEnvCCSID) API
- Get environment variable with CCSID (QzsrGetEnvCCSID) API