ILE COBOL Programmer's Guide

Data Division

Data Division

Order of DATA DIVISION and ENVIRONMENT DIVISION

See Order of DATA DIVISION and ENVIRONMENT DIVISION in section Environment Division.

FD or SD Entries

If a duplicate clause occurs in a FD entry or SD entry, and only one such clause is allowed, OPM COBOL/400 uses the last such clause specified.

In the same situation, ILE COBOL uses the first such clause specified.

WORKING-STORAGE SECTION

In ILE COBOL, the storage allocation of independent Working-Storage items does not reflect the order in which these items are declared in the Working-Storage section, as was the case in OPM COBOL/400.

The potential impact of this change in the way storage is allocated, is on those programs that use a circumvention scheme to alleviate the 32K maximum table size limitation of OPM COBOL/400. If your program uses a circumvention scheme to increase table size where multiple independent Working-Storage items are consecutively declared and range checking is turned off, then this scheme will no longer work. If a program that uses such a scheme is run using ILE COBOL, the program will produce unpredictable results.

For ILE COBOL, the maximum table size is now 16 711 568 bytes and thus the problem that triggered this circumvention scheme no longer exists. However, any programs that use this circumvention scheme will have to be recoded.

LIKE Clause

When a REDEFINES clause is found after a LIKE clause, the OPM COBOL/400 compiler issues a severity 20 message indicating that the REDEFINES clause has been ignored because it occurs after a LIKE clause.

In the same situation, the ILE COBOL compiler issues a severity 10 message when the REDEFINES clause is encountered and accepts the REDEFINES clause, but it also issues a severity 30 message indicating the LIKE clause is not compatible with the REDEFINES clause.

This scenario may occur in the case of other incompatible clauses such as LIKE and USAGE, or LIKE and PICTURE.

LINAGE Clause

OPM COBOL/400 flags a signed LINAGE integer with message LBL1350, but issues no message for signed FOOTING, TOP, and BOTTOM.

ILE COBOL issues message LNC1350 in all 4 cases.

PICTURE Clause

The PICTURE string .$$ is not accepted by the ILE COBOL compiler. Similarly, the PICTURE strings +.$$ and -.$$ are not accepted either.

When CR or DB appear on character positions 30 and 31 of a character string, they are not accepted as valid by the ILE COBOL compiler. The entire PICTURE string must be contained within the 30 characters.

REDEFINES Clause

OPM COBOL/400 initializes redefined items.

ILE COBOL does not initialize redefined items. The initial value is determined by the default value of the original data item.

VALUE Clause

In ILE COBOL, a numeric literal specified in the VALUE clause will be truncated if its value is longer than the PICTURE string defining it. In OPM COBOL/400, a value of 0 will be assumed.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]