CGIConvMode BINARY setting required for LANSAWEB CGI

Date: 29 August 2014
Product/Release: LANSA for the Web - V13 and above
Abstract: CGIConvMode BINARY is a mandatory setting in the HTTP Server Configuration for LANSAWEB CGI from V13 and above
Submitted By: LANSA Technical Support

As of V13, it is a mandatory requirement for the LANSAWEB CGI program to operate with the CGIConvMode BINARY setting in the HTTP Server configuration.

This requirement is primarily relevant to users who upgrade their existing LANSA for the Web system because the upgrade process does not alter existing HTTP Server configurations.

After upgrading, users may encounter unexpected web behaviours such as:

  • Passing data as parameters in the URL returns empty values.
  • Non-English characters are incorrectly displayed.

There are two ways to confirm that you have encountered this problem:

  1. Run LANSA for the Web About page (http://mywebserver/cgi-bin/lansaweb?about)
    The CGIMODE and CGI_OUTPUT_MODE environment variables will contain the value: BINARY
    Another value other than BINARY will mean  CGIConvMode is not correctly set.
  2. On the IBM i, the HTTP Server CGI job will report the warning messages if not correctly set:
    WARNING: Support of non-binary CGIConvMode (EBCDIC) is now deprecated.
    WARNING: It is highly recommended to set CGIConvMode to BINARY.

If you encounter either situations, from your HTTP Server instance configuration:

  1. Locate which COMLIB libary is the lansaweb URL mapped to, for example:
       ScriptAliasMatch ^/cgi-bin/lansaweb(.*) /QSYS.LIB/DCXCOMLIB.LIB/LANSAWEB.PGM$1
  2. Locate the corresponding COMLIB directory section and edit your configuration to set CGIConvMode BINARY, for example:
       <Directory /QSYS.LIB/DCXCOMLIB.LIB>
          . . .
          CGIConvMode BINARY
       . . .
  3. Restart your web server and run the LANSA Web clean up program for the new setting to take effect.


  • If installing a new LANSA system, the HTTP Server configuration for your web instance created by LANSA will have this setting CGIConvMode BINARY created as part of the install process.
  • If your HTTP Server configuration has CGIConvMode %%BINARY/BINARY%% listed, consider replacing this deprecated setting with the currently supported setting CGIConvMode BINARY