Previous Topic

Next Topic

Book Contents

Book Index

%%$CALCDTE

In the preceding step, the principal AutoEdit term is %%$CALCDTE. It is true that the function needed to be placed in a %%SET control statement, and it is also true that the returned result needed to be represented by a user-defined AutoEdit variable. But the purpose of this %%SET control statement is to perform the date calculation function. The control statement and user-defined variable are incidental to the function.

The format of function %%$CALCDTE is

%%$CALCDTE date ± quantity

where

In this step of your exercise, %%$CALCDTE subtracts one day from the ODATE.

Note: A related function, %%CALCDATE, makes the same calculation for dates having a 2-character year, that is, dates resolving to format yymmdd. This function has a 366 day limit on the number of days that can be added or subtracted. The %%CALCDATE function is supported for reasons of backward compatibility—it is recommended that %%$CALCDTE be used whenever possible.

Parent Topic

AutoEdit Function Details