Converting programs that use new reserved words
Some reserved words have been added since Enterprise COBOL Version 3.
If your programs
use any of the new reserved words as user-defined words (such as data
item names or paragraph names), then those words must be changed.
You can do something similar to what CCCA does and just add a suffix
such as
-85
to all instances of the word. For example:77 VOLATILE PIC S9(9) BINARY.
Move 0 TO VOLATILE.
To compile with Enterprise COBOL V5 or V6, change
it to: 77 VOLATILE-85 PIC S9(9) BINARY.
Move 0 TO VOLATILE-85.
The new reserved words are:
- ALLOCATE
- DEFAULT
- END-JSON
- FREE
- JSON
- JSON-CODE
JSON-STATUS
- VOLATILE
- XML-INFORMATION
- XML-NAMESPACE
- XML-NAMESPACE-PREFIX
- XML-NNAMESPACE
- XML-NNAMESPACE-PREFIX
- XML-SCHEMA
The conversion tool CCCA automatically converts these reserved words for you if you have the PTF for APAR PM86253 installed for Enterprise COBOL Version 5.1, or if you have the PTF for APAR PI32750 installed for Enterprise COBOL Version 5.2, or if you have the PTF for APAR PI55980 installed for Enterprise COBOL Version 6.1. CCCA is included with the IBM® Debug Tool product.
For a table comparing reserved words for all of the different COBOL compilers, see Table 1.