Enterprise COBOL provides COBOL 85 Standard support whereas VS COBOL II, Release 2, provided COBOL 74 Standard support (with some 85 Standard features added in). The implementation of the COBOL 85 Standard caused some language elements to behave in a manner that differs from the implementation of the COBOL 74 Standard.
Beginning with VS COBOL II, Release 3.0, you could choose COBOL 85 Standard behavior (without the Intrinsic Function module) by using NOCMPR2, or the COBOL 74 Standard behavior by using the CMPR2 compiler option. The CMPR2 option provided COBOL 74 Standard behavior as implemented by VS COBOL II, Release 2, as well as nonstandard Release 2 extensions now implemented in the COBOL 85 Standard. The NOCMPR2 option provided COBOL 85 Standard-conforming behavior and IBM extensions. This same mechanism was provided by IBM COBOL as an aid to allow delaying the upgrade from VS COBOL II, Release 2 level code to COBOL 85 Standard level code. In Enterprise COBOL, this delay is no longer available. Programs must be at the COBOL 85 Standard level to compile with Enterprise COBOL.
The language elements listed below are affected by the CMPR2/NOCMPR2 compiler option. The differences are explained in the sections that follow.
| Language element | Page |
|---|---|
| ALPHABET clause of the SPECIAL-NAMES paragraph | ALPHABET clause of the SPECIAL-NAMES paragraph |
| ALPHABETIC class | ALPHABETIC class |
| CALL ... ON OVERFLOW | CALL . . . ON OVERFLOW |
| Comparisons between scaled integers and nonnumerics | Comparisons between scaled integers and nonnumerics |
| COPY...REPLACING statements using non-COBOL characters | COPY ... REPLACING statements using non-COBOL characters |
| COPY statement using national extension characters | COPY statement using national extension characters |
| File status codes | File status codes |
| Fixed filed attributes and DCB= parameters of JCL | Fixed-file attributes and DCB= parameters of JCL |
| Implicit EXIT PROGRAM | Implicit EXIT PROGRAM |
| OPEN statement failing for QSAM file (FILE STATUS 39) | OPEN statement failing for QSAM files (FILE STATUS 39) |
| OPEN statement failing for VSAM files (FILE STATUS 39) | OPEN statement failing for VSAM files (FILE STATUS 39) |
| PERFORM return mechanism | PERFORM return mechanism |
| PERFORM...VARYING...AFTER | PERFORM ... VARYING ... AFTER |
| PICTURE clause with "A"s and "B"s | PICTURE clause with "A"s and "B"s |
| PROGRAM COLLATING SEQUENCE | PROGRAM COLLATING SEQUENCE |
| READ INTO and RETURN INTO | READ INTO and RETURN INTO |
| RECORD CONTAINS n CHARACTERS | RECORD CONTAINS n CHARACTERS |
| Reserved words | Reserved words |
| SET...TO TRUE | SET . . . TO TRUE |
| SIZE ERROR on MULTIPLY and DIVIDE | SIZE ERROR on MULTIPLY and DIVIDE |
| UNSTRING operand evaluation | UNSTRING operand evaluation |
| UPSI switches | UPSI switches |
| Variable-length group moves | Variable-length group moves |