Compile-Time Options

This chapter provides information about how to convert programs written for the RM/COBOL compiler to ACUCOBOL-GT. This is particularly directed at users who are new to ACUCOBOL-GT and are not familiar with its many options. The information contained here is specifically directed to programs written for version 2.X of the RM/COBOL 1974 compiler. Most of this information is also applicable to versions 1.5 and 1.6 of that compiler, as well as to RM/COBOL-85. See Converting RM/COBOL Data Files for information about converting RM/COBOL data files.

Several compile-time options should be used when you are compiling a program written for RM/COBOL with ACUCOBOL-GT. You should always use the " -Cr" flag to indicate RM/COBOL compatibility mode. You will also probably want to use the "-R8vais" flags to cause certain reserved words to be treated as user-defined words. This will cause all words not reserved by RM/COBOL to be treated as user-defined words. If you are converting programs from RM/COBOL-85, then you should use "-Rvais" instead.

Many applications will also need to use the "-Ds" flag. This flag specifies that the PICTURE element "S" for a USAGE DISPLAY item is treated as a separate character. This is the same as implying the SIGN IS TRAILING SEPARATE clause for that item. RM/COBOL version 1.6 behaved this way. RM/COBOL version 2.X can optionally behave this way. For applications that date from earlier versions of the RM/COBOL compiler, you will probably need to use this flag. If the application was written originally with version 2.0 or later, then you may or may not need to use this flag. You will need to examine the source to see if the S picture element counts in the size of an item or not. It is important to determine whether or not this flag should be used, particularly if you plan to convert existing data files. Otherwise, records loaded from your RM/COBOL files may not match the record layout of your new ACUCOBOL-GT files.

You may also want to use either the "-Vh" or "-Vl" flags. These flags determine the default video intensity to use when it is not explicitly stated in an ACCEPT or DISPLAY statement. The default action for ACUCOBOL-GT is to use the terminal's default intensity. The "-Vh" flag causes ACUCOBOL-GT to default to high intensity and the "-Vl" flag to low intensity. With RM/COBOL, the default intensity for UNIX machines is high intensity and for MS-DOS machines is low intensity. You may want to match the default intensity used by RM/COBOL for the machine the programs were written for.

By default, in the Identification Division the compiler allows an Area A line to start in column 8 or 9 (ANSI format), or 1 or 2 (terminal format). The --noRmMargin option can be used to apply a more stringent rule. When specified, lines in Area A of the Identification Division must begin in column 8 (ANSI format) or column 1 (terminal format).

The table below shows the RM/COBOL Compatibility Switches ("*" indicates an optional flag).

  Version 1.6 Version 2.x RM-85
General -Cr -Cr -Cr
Reserved words -R8vais -R8vais -Rvais
Data storage -Ds -Ds* -Ds*
Video -Vh (for UNIX)

-Vl (for DOS)

-Vh (for UNIX)

-Vl (for DOS)

-Vh (for UNIX)

-Vl (for DOS)

Area A --noRmMargin* --noRmMargin* --noRmMargin*

You will probably want to set the COPYPATH environment variable in order to locate your COPY libraries on your system. For details on how to do this, see Compiler and Runtime.