Compatibility Options

ACUCOBOL-GT has several options that aid in converting programs written for other COBOL environments. By default, ACUCOBOL-GT runs in the VAX COBOL compatibility mode. See Compatibility Modes for more information.

-Ca       This option causes simple ACCEPT and DISPLAY statements to be treated in accordance with ANSI semantics. Specifying this option is the same as specifying FROM CONSOLE for all simple ACCEPT statements and UPON CONSOLE for all simple DISPLAY statements. You can control this behavior for individual ACCEPT or DISPLAY statements by specifying an explicit FROM/UPON phrase.See ANSI ACCEPT and DISPLAY Verbs for more information.

Prior to Version 2.1, -Ca was a synonym for the compile-time option -Va. If you have an obsolete reference to -Ca in any of your compile scripts, or in your CBLFLAGS environment setting, make sure that you change this to -Va.

-Cb This option causes all sequential files that are not explicitly specified as LINE or BINARY sequential to be treated as BINARY sequential. Normally the file type is determined by a long sequence of rules. Files specified as print files are treated as LINE sequential even when this option is selected.
-Ce

This option allows you to specify a default source name extension that is used for both the main source file and its COPY files. When it is specified, any source or COPY file name that does not explicitly specify an extension has the default extension appended to it. When the option is specified in RM/COBOL compatibility mode, the default extension is .CBL. Otherwise, the default is .COB.

You may specify an alternate default by naming it after an = sign in the -Ce option. For example, the option -Ce=CPY would cause the default extension to be .CPY.

ACUCOBOL-GT automatically adjusts the extension for upper or lower case to match the case of the name it is being appended to, then searches for the COPY file. If this first search fails, ACUCOBOL-GT matches the case of the extension specified in the -Ce compiler option to perform a second search for the COPY file.

-Cf This option forces all indexed, relative, and binary sequential files to be given fixed-length records. Normally the record type is determined by a sequence of rules. This flag is supplied to enhance compatibility with pre-85 compilers and earlier versions of ACUCOBOL-GT.
-Cg Turns off the conditional compiling features. In version 8.1.0 (ECN 3607) conditional compilation was added to ACUCOBOL-GT. Conditional compiling statements begin with the $ sign. In prior versions, lines of code that began with the $ sign were treated as comments. Unfortunately, some COBOL programs use a type of conditional compilation, which now fail to compile. Turning off conditional compiling should rectify these situations. See Conditional Compilation Options for information on conditional compiling.
-Ci This option causes the compiler to be compatible with ICOBOL for certain COBOL constructs. References in this manual to VAX COBOL compatibility also apply to ICOBOL compatibility mode unless otherwise stated.
-Ck

This option causes the compiler to generate key numbers for indexed file alternate keys in a different order. Key numbers are used internally by the compiler and runtime to identify a key. Normally, you don't need to know the key number for a particular key, or care about the order in which they are generated. By default, the compiler sorts the alternate keys in record order before assigning key numbers. This ensures that the keys are given the same number regardless of the ordering in the file's SELECT. Specifying -Ck causes the compiler to assign key numbers in the SELECT order.

For most applications, the order in which key numbers are assigned is irrelevant. This option provides compatibility with some other COBOL compilers. This could be helpful when you are sharing data files between ACUCOBOL-GT-based programs and programs compiled with these other systems.

-Cm

This option causes the compiler to be compatible with IBM/COBOL for the ASSIGN phrase of a SELECT statement. The syntax for the IBM/COBOL ASSIGN phrase is:

ASSIGN TO <filename-1> [<filename-2>
				<filename-3> ...]

where <filename-1>, <filename-2>, and <filename-3> are file identifiers.

Compiling with the -Cm option allows the IBM/COBOL ASSIGN phrase to ignore <filename-2> and <filename-3>. If <filename-1> contains any "-" characters, only the characters following the last "-" will constitute the file name assignment for the particular SELECT command. For example:

SELECT TESTFILE ASSIGN TO SYS000-AS-TEST1

results in a file called TEST1.

All of the existing ACUCOBOL-GT SELECT phrases and options can be used with the IBM/COBOL ASSIGN phrase.

-Cp This option sets the compiler to its HP COBOL compatibility mode. In this mode, it accepts features of HP COBOL that are not otherwise accepted.
-Cr This option sets the compiler to its RM COBOL compatibility mode. In this mode, it accepts features of RM COBOL that are not otherwise accepted.
-Cv This option sets the compiler to its IBM DOS/VS compatibility mode. In this mode, it accepts features of IBM DOS/VS COBOL that are not otherwise accepted.

Since there are slight differences between IBM COBOL versions, -Cv also takes the following optional arguments:

-Cv=OSVS specifies OSVS compatibility.

-Cv=VSC2 specifies VSC2 compatibility.

-Cv by itself defaults to OSVS mode. The two modes are very similar, except that in VSC2 compatibility mode, the following words are not reserved:
  • CURRENT-DATE
  • EXAMINE
  • TIME-OF-DAY
  • TRANSFORM

Note that CURRENT-DATE is a valid function in any compatibility mode.

-C3 This option causes ACUCOBOL-GT to abide by the rules used by Version 1.3. Later versions changed the way ACUCOBOL-GT treats a few special cases. If you use this flag, ACUCOBOL-GT will treat these cases in the same way it did under Version 1.3. This is useful if you are compiling programs written for Version 1.3 and you do not want to modify the programs. See Appendix C. Changes Affecting Previous Versions for details of which features are affected by this option.

Specifying this option does not prohibit the use of later features, but merely ensures that the changed features behave in the original fashion. Compare with the -Z3 option below.

-C4 Similar to -C3, this option causes the compiler to generate code according to the rules used by Version 1.4.
-C5 This option causes the compiler to maintain source compatibility with the Version 1.5 compiler.
-C20 This option causes the compiler to maintain source compatibility with the Version 2.0 compiler. Chart verbs are allowed.
-C21 This option causes the compiler to maintain source compatibility with the Version 2.1 compiler.
-C22 This option causes the compiler to maintain source compatibility with the Version 2.2 compiler.
-C23 This option causes the compiler to maintain source compatibility with the Version 2.3 compiler.
-C24 This option causes the compiler to maintain source compatibility with the Version 2.4 compiler.
-C30 This option causes the compiler to maintain source compatibility with the Version 3.0 compiler.
-C31 This option causes the compiler to maintain source compatibility with the Version 3.1 compiler
-C32 This option causes the compiler to maintain source compatibility with the Version 3.2 compiler.
-C40 This option causes the compiler to maintain source compatibility with the Version 4.0 compiler.
-C41 This option causes the compiler to maintain source compatibility with the Version 4.1 compiler.
-C42 This option causes the compiler to maintain source compatibility with the Version 4.2 compiler.
-C43 This option causes the compiler to maintain source compatibility with the Version 4.3 compiler.
-C50 This option causes the compiler to maintain source compatibility with the Version 5.0 compiler.
-C51 This option causes the compiler to maintain source compatibility with the Version 5.1 compiler.
-C52 This option causes the compiler to maintain source compatibility with the Version 5.2 compiler.
-C60 This option causes the compiler to maintain source compatibility with the Version 6.0 compiler.
-C61 This option causes the compiler to maintain source compatibility with the Version 6.1 compiler.
-C62 This option causes the compiler to maintain source compatibility with the Version 6.2 compiler.
-C70 This option causes the compiler to maintain source compatibility with the Version 7.0 compiler.
-C71 This option causes the compiler to maintain source compatibility with the Version 7.1 compiler.
-C72 This option causes the compiler to maintain source compatibility with the Version 7.2 compiler.
-C73 This option causes the compiler to maintain source compatibility with the Version 7.3 compiler.
-C80 This option causes the compiler to maintain source compatibility with the Version 8.0 compiler.
-C81 This option causes the compiler to maintain source compatibility with the Version 8.1 compiler.