If your CGI programs currently run on a Unix platform, they may run on the iSeries™ HTTP Server in PASE. To do this, store your CGI programs in the QOpenSys file system. You should then verify that your program will run in PASE. For more information on how to prepare your code and insure that it will run effectively in PASE, see the Prepare programs to run in PASE 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, 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 will use PASE_LANG=POSIX and QIBM_PASE_CCSID=819 if it does not recognize the LANGID and CNTRYID pair. The i5/OS™ PASE LANG environment variable controls the default locale for an i5/OS PASE program. These default values may be overridden by setting BOTH ILE enviorment variables 'PASE_LANG' and 'QIBM_PASE_CCSID' using the HTTP directive 'setenv'. If either of these are not set, the default values (based on LANGID and CNTRYID of the CGI JOB) will be used. For example, setenv PASE_LANG JA_JP setenv QIBM_PASE_CCSID 1208
See OS/400® PASE Locales to determine what locales are supported by i5/OS PASE.
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/