COBOL source code differences in Enterprise COBOL Version 5 and Version 6

Several language elements have been removed or modified in Enterprise COBOL V5 and V6 that may require updates to your source programs.

The Millennium Language Extensions are no longer supported. If your programs have any of these language elements, they must be removed before you can compile and run these programs with Enterprise COBOL V5 or V6 :
  • DATE FORMAT clause
  • DATEVAL intrinsic function
  • UNDATE intrinsic function
  • YEARWINDOW intrinsic function
There have been changes to LABEL declarative support. If your programs have any of these language elements, they must be removed before you can compile and run these programs with Enterprise COBOL V5 or V6:
  • Format 2 declarative syntax: USE...AFTER...LABEL PROCEDURE... is no longer supported
  • The syntax: GO TO MORE-LABELS is no longer supported.

Starting in Enterprise COBOL V5.2, VOLATILE is a new reserved word. Existing programs that use VOLATILE as a user-defined word (for example, as a data name or paragraph name) will get S-level diagnostic messages with Enterprise COBOL V5.2 and V6. You must change these instances of VOLATILE to other words such as VOLATILE-X, or you can use the CCCA utility to do it for you.

Start of changeFor INSPECT...TALLYING, previous versions of the compiler inserts zone nibbles in a display numeric inspected item before performing the INSPECT. This will for example change SPACES to ZEROS. COBOL V5.1 and later no longer do this zone normalization. Having INSPECT without a REPLACING clause update the inspected item is unexpected.End of change

Start of changeWhen moving a 16-bit COMP-5 sender (PICTURE clause PIC 9(2) through PIC 9(4)), with value x'8000' or higher, to an alphanumeric data item, Enterprise COBOL V4.2 incorrectly uses an instruction that loads the value as a 32-bit value with the high sixteen bits all ones. This incorrectly changes the value that is moved to the PIC X(9) receiver. Enterprise COBOL V5 and V6 correctly load the 16-bit value as a 32-bit value with the high sixteen bits all zeros, which is correct, but is different from Enterprise COBOL V4.2.End of change

Changes apply to Enterprise COBOL V6 only

Start of changeStarting in Enterprise COBOL V6.1, ALLOCATE, DEFAULT, END-JSON, FREE, JSON, and JSON-CODE are new reserved words. Existing programs that use these words as user-defined words (for example, as data names or paragraph names) will get S-level diagnostic messages with Enterprise COBOL V6. You must change instances of these reserved words to other words such as ALLOCATE-X or JSON-Y, or you can use the CCCA utility to do it for you.End of change

Start of changeStarting in Enterprise COBOL V6.2, JSON-STATUS is a new reserved word. Existing programs that use JSON-STATUS as a user-defined word (for example, as a data name or paragraph name) will get S-level diagnostic messages with Enterprise COBOL V6.2. You must change these instances of JSON-STATUS to other words such as JSON-STATUS-X, or you can use the CCCA utility to do it for you.End of change

In Enterprise COBOL V5 and earlier versions, a non-88 level VALUE clause in the LINKAGE SECTION or FILE SECTION was treated as a comment. However, starting in Enterprise COBOL V6.1, the VALUE clause for LINKAGE SECTION and FILE SECTION items is now syntax checked and has meaning. This means that a program that is compiled with RC=0 with COBOL V5 could get RC=12 with COBOL V6.

For example, with Enterprise COBOL V5 and earlier versions:
  000224          LINKAGE SECTION.                                                           
  000225            01 ALPH-ITEM  PIC X(4)  VALUE 1234.                                      
                                                                                                   
==000225==> IGYDS1158-I A non-level-88 "VALUE" clause was found in the 
"FILE SECTION" or "LINKAGE SECTION". The "VALUE" clause was treated as comments. 
With Enterprise COBOL V6:
  000224          LINKAGE SECTION.                                                           
  000225            01 ALPH-ITEM  PIC X(4)  VALUE 1234.                                      
                                                                                                   
==000225==> IGYGR1080-S A "VALUE" clause literal was not compatible with the data 
category of the subject data item. The "VALUE" clause was discarded.