


In order to map CGI programs with the .acu extension to run with the ACUCOBOL-GT runtime (wrun32.exe), some Web servers must be specially configured. Although we have included helpful suggestions in this section for configuring Web server products for this purpose, please be aware that Acucorp is unable to support Web server configuration efforts. Configuration procedures vary with each Web server product, so be sure to refer to your Web server documentation for specific details.
If your Web server software is NT Internet Information Server (IIS) 4.0, then you associate your .acu applications with the runtime as follows:
1. Start Regedt32.exe and open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\ScriptMap.
(Note: before editing your system registry, you should always make a back up copy. That way, if problems arise, you can revert back to the previous version.)
2. From the Edit menu, choose Add Value. The Data type is REG_SZ.
3. Type the file-name extension used for your CGI script:
.acu
4. In the String editor, type the full path to the runtime used with that script. For example, C:\Acucobol42\acugt\bin\wrun32.exe %s %s
5. Restart the WWW service.
Although configuration procedures vary with Web server platform, each Web server shares one characteristic: if a CGI program attempts any operation that waits for a user response, it will cause the CGI process to "hang." At best this wastes system resources. At worst, it may cause the entire Web server to "hang." Even if your code does not wait for user input, there may be some cases when the runtime displays a message box even before loading the COBOL program, or when shutting down due to an error that is not handled by the COBOL program.
Therefore, to avoid problems with the Web server when running your CGI program, you should configure the Web server in one of two ways: using the "-f" command line option at runtime or configuring the environment with the A_CGI environment variable. We recommend that you use the "-f" option, because environment variables could affect other COBOL programs as well.