X 126.96.36.199.1 Condition-Name Conditions and Windowed Date Field Comparisons
X If the conditional variable is a windowed date field, then the values
X associated with its condition-names are treated like values of the
X windowed date field; that is, they are treated as if they were converted
X to expanded date format, as described under "Semantics of Windowed Date
X Fields" in topic 188.8.131.52.
X For example, given YEARWINDOW(1945), specifying a century window of
X 1945-2044, and the following definition:
X 05 DATE-FIELD PIC 9(6) DATE FORMAT YYXXXX.
X 88 DATE-TARGET VALUE 051220.
X then a value of 051220 in DATE-FIELD would cause the following condition
X to be true:
X IF DATE-TARGET...
X because the value associated with DATE-TARGET and the value of DATE-FIELD
X would both be treated as if they were prefixed by "20" before comparison.
X However, the following condition would be false:
X IF DATE-FIELD = 051220...
X because, in a comparison with a windowed date field, literals are treated
X as if they are prefixed by "19", regardless of the century window. So the
X above condition effectively becomes:
X IF 20051220 = 19051220...
X For more information on using windowed date fields in conditional
X expressions, see "Date Fields" in topic 184.108.40.206.1.
© Copyright IBM Corp. 1991, 1998
IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.
Return to library:
IBM Hardware |
IBM System z Redbooks
How to order publications
Download IBM Library Reader |
Download IBM Softcopy Reader |
Download Adobe® Acrobat® Reader®
Download IBM Softcopy Librarian
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks
of Adobe Systems incorporated.