Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


Restrictions on using date fields

The following sections describe restrictions on using date fields in these contexts:

For restrictions on using date fields in other contexts, see:

Combining the DATE FORMAT clause with other clauses

The following phrases are the only phrases of the USAGE clause that can be combined with the DATE FORMAT clause:

1USAGE COMPUTATIONAL cannot be combined with the DATE FORMAT clause if the TRUNC(BIN) compiler option is in effect.

The PICTURE character-string must specify the same number of characters or digits as the DATE FORMAT clause. For alphanumeric date fields, the only PICTURE character-string symbols allowed are A, 9, and X, with at least one X. For numeric date fields, the only PICTURE character-string symbols allowed are 9 and S.

The following clauses are not allowed for a data item defined with DATE FORMAT:

The EXTERNAL clause is not allowed for a windowed date field or a group item that contains a windowed date field subordinate item.

Some restrictions apply when combining the following clauses with DATE FORMAT:

Group items that are date fields

If a group item is defined with a DATE FORMAT clause, then the following restrictions apply:

Language elements that treat date fields as nondates

If date fields are used in the following language elements, they are treated as nondates. That is, the DATE FORMAT is ignored, and the content of the date data item is used without undergoing automatic expansion.

Language elements that do not accept windowed date fields as arguments

Windowed date fields cannot be used as:

Windowed date fields cannot be used as ascending or descending keys in MERGE or SORT statements.

Language elements that do not accept date fields as arguments

Neither windowed date fields nor expanded date fields can be used:

(Date fields cannot be used as operands in division or multiplication.)


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)