The following table lists the language elements that are different between the host COBOL and COBOL for Windows compilers.
Many host COBOL clauses and phrases are syntax checked but have no effect on the execution of the program under COBOL for Windows. These clauses and phrases should have minimal effect on existing applications that you download. COBOL for Windows recognizes and processes most host COBOL language syntax even if the language element has no functional effect.
| Language element | Implementation |
|---|---|
| ACCEPT statement | Under COBOL for Windows, environment-name and the associated environment-variable value, if set, determines file identification. |
| APPLY WRITE-ONLY clause | Syntax checked, but has no effect on the execution of the program under COBOL for Windows |
| ASSIGN clause | Different syntax for assignment-name. ASSIGN. . .USING data-name is not supported under host COBOL. |
| BLOCK CONTAINS clause | Syntax checked, but has no effect on the execution of the program under COBOL for Windows |
| CALL statement | A file-name as a CALL argument is not supported under COBOL for Windows. |
| CLOSE statement | The following phrases are syntax checked, but have no effect on the execution of the program under COBOL for Windows: FOR REMOVAL, WITH NO REWIND, and UNIT/REEL. |
| CODE-SET clause | Syntax checked, but has no effect on the execution of the program under COBOL for Windows |
| DATA RECORDS clause | Syntax checked, but has no effect on the execution of the program under COBOL for Windows |
| DISPLAY statement | Under COBOL for Windows, environment-name and the associated environment-variable value, if set, determines file identification. |
| File status data-name-1 | Some values and meanings for file status 9x are different under host COBOL than under COBOL for Windows. |
| File status data-name-8 | The format and values are different depending on the platform and the file system. |
| LABEL RECORD clause | LABEL RECORD IS data-name, USE. . .AFTER. . .LABEL PROCEDURE, and GO TO MORE-LABELS are syntax checked, but have no effect on the execution of the program under COBOL for Windows. These language elements are processed by the compiler; however, the user label declaratives are not called at run time. |
| MULTIPLE FILE TAPE | Syntax checked, but has no effect on the execution of the program under COBOL for Windows. On the Windows-based workstation, all files are treated as single volume files. |
| OPEN statement | The following phrases are syntax checked, but have no effect on the execution of the program under COBOL for Windows: REVERSED and WITH NO REWIND. |
| PASSWORD clause | Syntax checked, but has no effect on the execution of the program under COBOL for Windows |
| POINTER, PROCEDURE-POINTER, and FUNCTION-POINTER data items | Under host COBOL, POINTER and FUNCTION-POINTER data items are defined as 4 bytes; a PROCEDURE-POINTER data item is defined as 8 bytes. Under COBOL for Windows, the size of these data items is 4 bytes. |
| READ. . .PREVIOUS | Under COBOL for Windows only, allows you to read the previous record for relative or indexed files with DYNAMIC access mode |
| RECORD CONTAINS clause | The RECORD CONTAINS n CHARACTERS clause is accepted with one exception: RECORD CONTAINS 0 CHARACTERS is syntax checked, but has no effect on the execution of the program under COBOL for Windows. |
| RECORDING MODE clause | Syntax checked, but has no effect on the execution of the program under COBOL for Windows for relative, indexed, and line-sequential files. RECORDING MODE U is syntax checked, but has no effect on the execution of the program for sequential files. |
| RERUN clause | Syntax checked, but has no effect on the execution of the program under COBOL for Windows |
| RESERVE clause | Syntax checked, but has no effect on the execution of the program under COBOL for Windows |
| SAME AREA clause | Syntax checked, but has no effect on the execution of the program under COBOL for Windows |
| SAME SORT clause | Syntax checked, but has no effect on the execution of the program under COBOL for Windows |
| SORT-CONTROL special register | The contents of this special register differ between host and workstation COBOL. |
| SORT-CORE-SIZE special register | The contents of this special register differ between host and workstation COBOL. |
| SORT-FILE-SIZE special register | Syntax checked, but has no effect on the execution of the program under COBOL for Windows. Values in this special register are not used. |
| SORT-MESSAGE special register | Syntax checked, but has no effect on the execution of the program under COBOL for Windows |
| SORT-MODE-SIZE special register | Syntax checked, but has no effect on the execution of the program under COBOL for Windows. Values in this special register are not used. |
| SORT MERGE AREA clause | Syntax checked, but has no effect on the execution of the program under COBOL for Windows |
| START. . . | Under COBOL for Windows, the following relational operators are allowed: IS LESS THAN, IS <, IS NOT GREATER THAN, IS NOT >, IS LESS THAN OR EQUAL TO, IS <= |
| WRITE statement | Under COBOL for Windows, if you specify WRITE. . .ADVANCING with environment names C01 through C12 or S01 through S05, one line is advanced. |
| Names known to the platform environment | The following names are identified differently: program-name, text-name, library-name, assignment-name, file-name in the SORT-CONTROL special register, basis-name, DISPLAY or ACCEPT target identification, and system-dependent names. |