Running CGI programs in IBM PASE for i
The IBM® HTTP Server for i Web server can run CGI programs created to run in the IBM Portable Application Solutions Environment for i. In addition, the HTTP Server can also run programs that follow the FastCGI protocol.
CGI programs that currently run on the AIX® platform may be able to run on an IBM HTTP Server for i Web server in PASE for i. To do this, store your CGI programs in the QOpenSys file system. You should then verify that your program will run in PASE for i. For more information on how to prepare your code and ensure that it will run effectively in PASE for i, see the Prepare programs to run in IBM PASE for i topic. And finally, use the ScriptAlias directive in the configuration file, httpd.conf, to map the URL to the program, as you would with any CGI program.
For CGI programs that run in PASE for i, environment variables are converted from the CGI job CCSID to the CCSID specified by the ILE environment variable QIBM_PASE_CCSID. The ILE environment variable PASE_LANG specifies the PASE Locale. The default values are functions of the current LANGID and CNTRYID attributes of the CGI job, but the system uses PASE_LANG=POSIX and QIBM_PASE_CCSID=819 if it does not recognize the LANGID and CNTRYID pair. The LANG environment variable controls the default locale for the CGI program that will be running in PASE for i. These default values may be overridden by setting both ILE environment variables 'PASE_LANG' and 'QIBM_PASE_CCSID' using the HTTP directive 'setenv'. If either of these are not set, the default values will be used. For example, setenv PASE_LANG JA_JP setenv QIBM_PASE_CCSID 1208
See PASE for i Locales to determine what locales are supported.
Sample CGI Program Configuration
This sample code shows one way to use the ScriptAlias directive to map your CGI program to a URL.
ScriptAlias /cgi-pase/ /QOpenSys/myserver/cgi-bin/