Compiling Programs with NLS

Restriction: National Locale Support is only supported for native COBOL code.

To use the NLS facility in your program, you must compile it with the NLS Compiler directive set. By default, the NLS Compiler directive is not set.

If you do set the NLS directive then, before checking the syntax of a program, you must ensure that it does not contain any of the following syntax:

If your program contains any of the above syntax, and you want to use the NLS facility, you must either remove the syntax from your program, or mark it as a comment line. If you set the NLS directive and attempt to compile a program which contains any of the above syntax, compilation fails with the error:

136 Illegal use of phrase for National Language operation

You can compile any program in a COBOL application with the NLS directive set, providing it does not contain any of the above syntax. Thus some programs within an application might use NLS facilities, while others might not.

For more information, read Mixing programs with and without NLS.