X 5.3.6.1 Semantics of Windowed Date Fields
X Windowed date fields undergo automatic expansion relative to the century
X window when they are used as operands in arithmetic expressions or
X arithmetic statements. However, the result of incrementing or
X decrementing a windowed date is still treated as a windowed date for
X further computation, comparison, and storing.
X When used in the following situations, windowed date fields are treated as
X if they were converted to expanded date format:
- X Operands in subtractions in which the other operand is an expanded
X date
- X Operands in relation conditions
- | A sending field in arithmetic or MOVE statements
X The details of the conversion to expanded date format depend on whether
X the windowed date field is numeric or alphanumeric.
X Given a century window starting year of 19nn, the year part (yy) of a
X numeric windowed date field is treated as if it was expanded as follows:
- X If yy is less than nn, then add 2000 to yy
- X If yy is equal to or greater than nn, then add 1900 to yy
X For signed numeric windowed date fields, this means that there can be two
X representations of some years. For instance, windowed year values 99 and
X -01 are both treated as 1999, since 1900 + 99 = 2000 + -01.
X Alphanumeric windowed date fields are treated in a similar manner, but
X using a prefix of "19" or "20" instead of adding 1900 or 2000.
X For example, when used as an operand of a relation condition, a windowed
X date field defined by:
X 01 DATE-FIELD DATE FORMAT YYXXXX PICTURE 9(6)
X VALUE IS 450101.
X is treated as if it was an expanded date field with a value of:
- X 19450101, if the century window starting year is 1945 or earlier
X or
- X 20450101, if the century window starting year is later than 1945
Subtopics:
© Copyright IBM Corp. 1991, 1998
IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.
Return to library:
z/OS |
z/OS.e |
TPF |
z/VSE |
z/VM |
IBM Hardware |
IBM System z Redbooks
Glossary:
IBM terminology
Publications:
How to order publications
Readers:
Download IBM Library Reader |
Download IBM Softcopy Reader |
Download Adobe® Acrobat® Reader®
Library management:
Download IBM Softcopy Librarian
Contacts:
Contact z/OS
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks
of Adobe Systems incorporated.