COBOL source code differences in Enterprise COBOL Version 6

The following differences apply to Enterprise COBOL V6 specifically.

Reserved words

Starting in Enterprise COBOL 6.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 6. 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.

Starting in Enterprise COBOL 6.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 6.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.

Starting in Enterprise COBOL 6.3, BYTE-LENGTH, JAVA, LIMIT, POINTER-32, and UTF-8 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 6.3. You must change instances of these reserved words to other words such as BYTE-LENGTH-X or BYTE-LENGTH-Y, or you can use the CCCA utility to do it for you.

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

CURRENCY SIGN clause

Starting in Enterprise COBOL 6.3, in the CURRENCY SIGN clause of the SPECIAL-NAMES paragraph:
  • If the PICTURE SYMBOL phrase is not specified, then operand literal-6 can no longer be the character 'U' or the character 'u'.
  • If the PICTURE SYMBOL phrase is specified, then operand literal-7 can no longer be the character 'U' or the character 'u'.

VALUE clause

In Enterprise COBOL 5 and earlier versions, a non-88 level VALUE clause in the LINKAGE SECTION or the FILE SECTION was treated as a comment and ignored.

For example, with Enterprise COBOL 5 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. 

However, starting in Enterprise COBOL 6.1, the VALUE clause for the LINKAGE SECTION and the FILE SECTION items is now syntax checked and has meaning.

With Enterprise COBOL 6:
  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.    
In COBOL 6:
  • If the data VALUE literal is incompatible with the PICTURE clause, as shown in the example above, the IGYGR1080-S error message will be issued.
  • If the data VALUE literal is compatible with the PICTURE clause, it will be used to initialize the data item in the LINKAGE SECTION when the data item is used in an INITIALIZE...TO VALUE statement.

In summary, a COBOL 5 program with a non-88 level VALUE clause in the LINKAGE SECTION that is compiled with an RC=0 could get an RC=12 with COBOL 6 or have the LINKAGE data item be initialized when the data item is used in an INITIALIZE...TO VALUE statement, depending on the validity of the VALUE clause literal.

CALL...USING file-name statement

The use of passing a file-name to a subprogram with the USING phrase of the CALL statement was removed in Enterprise COBOL 6.3, but is restored in Enterprise COBOL 6.3 with PTF for APAR PH20724 installed.