Admin Production rocket
Current Publication

Compiler Directives for RM/COBOL Compatibility

Visual COBOL Development Hub V8.0
Rocket® Visual COBOL® (formerly a product of Micro Focus or formerly a product of Open Text) documentation, created before Rocket Software acquired certain products from OpenText, may include outdated references to "Micro Focus" or "OpenText", both of which are trademarks of OpenText or its affiliates. Rocket Software is not affiliated with Micro Focus or OpenText and has since rebranded these products as Rocket® products. You may also encounter outdated links in this documentation. If you do, please contact Rocket Support (support@rocketsoftware.com) for assistance.

Compiler Directives for RM/COBOL Compatibility

You can set a number of Compiler directives in your RM/COBOL source programs that enable a program to emulate RM/COBOL behavior.

The main directive that sets the majority of RM/COBOL behavior is DIALECT"RM". Setting this directive automatically sets additional Compiler directives; see the topic RM Dialect Settings for full details of the directives set.

Previously, compatibility was achieved by compiling with the RM Compiler directive. The newer DIALECT"RM" directive sets and extends the compatibility given by RM, but you should only use it in a native COBOL environment. It is recommended that you use DIALECT"RM" for all new migrations from RM/COBOL to native MF COBOL, unless you normally set the ANSI switch when you submit your RM/COBOL source programs to the RM/COBOL system. If you do, set the RM"ANSI" directive when you compile your programs.

We also recommend that you set the NOMF directive when you submit your RM/COBOL source programs to this COBOL system. This ensures that only those words which are treated as reserved words under the ANSI '74 COBOL standard are regarded as reserved words by this COBOL system.

Setting the NORM directive disables the syntax enabled when the RM directive was set, and automatically resets the additional Compiler directives and syntax that RM originally set.

The final states of the additional directives set when you use the NORM directive are not necessarily the same as their initial default states.