Differences between Interactive COBOL 4.xx (4.60) 04-Jun-2012 and Interactive COBOL 2.xx 1. ICOBOL 3 had a new .cx format that required that all COBOL programs be re-compiled. ICOBOL 4 allows both ICOBOL 3 format .cx files and ICOBOL 2 format .cx files to be run. Starting in 4.50 no additional IC2X license option is required for this to work and in addition at startup time the runtime will automatically detect an ICOBOL 2 .cx and run in that mode. This option is especially useful for those who want to move forward with logging, thinclient support, etc. but cannot or do not wish to recompile their programs. 2. An ICOBOL 2 icbltn.dll(.so) cannot be used with ICOBOL 4. You must recompile that module. Below apply ONLY if the ICOBOL 2 sources are recompiled under ICOBOL 4 3. ICOBOL 3 added many new reserved words for the ICOBOL and ICOBOL85 dialects. Variables with these names must be renamed if the programs are recompiled. 4. The ICOBOL 2 compiler allowed a FROM and a USING clause in the SCREEN section and generated code as if it was a FROM and a TO clause. This case is now an error. It must be re-coded if the program is recompiled. 5. Items with USAGE INDEX require 4-bytes of storage. In ICOBOL 2 these items required only 2-bytes. If USAGE INDEX items have been included in data files, these files will have to be reorganized to allow for 4 rather than 2 bytes for each USAGE INDEX item. 6. The COMPUTE statement no longer truncates immediate results so results in COMPUTE statements should be more accurate as required by the COBOL standard. 7. ICOBOL 4 handles parameters to builtins differently than ICOBOL 2. Programs should have exception handling for builtin calls to detect errors. If a builtin calls for a PIC X(n) then only that can be passed, passing a numeric PIC 9(n) will cause a 209 Paramter mismatch error. 8. Size error conditions for COMP-5 data items are based on the allocated storage rather than the number of digits in the item's picture. 9. The ICOBOL 4 compiler will not allow an OPEN INPUT on a file with an ASSIGN TO PRINTER. (This option was useful for checking for file existence.) A workaround is to have a duplicate file descriptor as an ASSIGN TO KEYBOARD with the same record, name, file status etc. and use it in the OPEN INPUT. 10. When doing an increment to a number that overflowed and no size condition was set, ICOBOL 2 would internally generate the size condition and not do the store (leaving the value unchanged). ICOBOL 4 will not check the size condition and will store the truncated value. Code should be changed to detect the size condition and do a CONTINUE, i.e., ON SIZE CONTINUE. 11. In ICOBOL 4, screens do not support embedded control codes for positioning as in ICOBOL 2. Use variable line and column phrases. 12. Comparisons of a numeric data item and a non-numeric data item or figurative constant may return different results. ICOBOL 2 and previous ICOBOL compilers incorrectly generated a non-numeric compare with the storage occupied by the numeric data item. When mixing a numeric item and a non-numeric item in a comparison, the COBOL Standard requires that the numeric item be treated as if it was moved to a temporary alphanumeric item and then that temporary item is compared using a non-numeric comparison. Some ICOBOL 2 (or earlier) code initialized storage by moving LOW-VALUES to the storage and then comparing numeric and non-numeric items from that storage area with LOW-VALUES. The old ICOBOL compiler would return TRUE, and ICOBOL 3 and 4 will return FALSE. When the numeric item is converted for the comparison, it has ASCII zero characters, which are not the same as LOW-VALUES. See VI. Procedure Division, B. Concepts, 2. Conditional Expressions in the Language Reference Manual. A Warning is generated by the compiler when this is detected. A better practice is to use the INITIALIZE statement to properly initialize data items and to use numeric [figurative] constants when the data item is numeric. Another way this old construct can fail is when COLLATING SEQUENCE is used, since LOW-VALUES may not be a binary zero value. 13. ACCEPT FROM LINE NUMBER in ICOBOL 3 and 4 returns more digits than in ICOBOL 2 (5 instead of 3). Some programs used a PIC X(3) field as the target of ACCEPT FROM LINE NUMBER instead of a PIC 9(3) (e.g., because the field is a key). The effect is that the field receives only the left 3 digits of the line number, and the right two digits are lost. End of Differences