Previous Topic: Calculations Involving Date Fields

Next Topic: Use of the Glossary


Date Manipulation

Where user-coded CA JARS Wizard control statements manipulate dates or portions of dates, these statements may need to be modified in order to process 21st century dates correctly.For example, if a COMPUTE(P) statement moves the year portion of an MM/DD/YY date to a field specified in a SORT statement,CA JARS Wizard treats that sort field like any other character field and makes no adjustment for century; thus, a value of 00 sorts ahead of a value of 99.

The same holds true for selection/rejection on a field not defined as a date. If a SELECT or REJECT statement specifies a year field (not an entire date field in YYDDD, YYMMDD, or YY/MM/DD format), CA JARS Wizard does not take the century into account and thus treats a year of 00 as less than a value of 98. The control statements have to be modified in order for the century to be taken into account.

Thus, if a date or portion of a date is moved to a field not defined with a date attribute, the target field is treated as an ordinary number or character string. It makes no adjustment for century when processing the field.