Create a file of >Defines for Yesterday, Today, and Tomorrow

You can use the following approach which uses the Mentor functions OffsetDate and Juliandate to create a file that has >defines for @Today, @Tomorrow, and @Yesterday. That file then can be ampersanded into any other run so you can references those days. This setup also shows how to set up other offset days, such as 2, 7, 14, 21, 30, 60, and 90 days.

>purgesame
~In $
~Out Dates^Std,Ascii,length=80
~Def

TodaysDate: [101.20$]
NewDate: [121.20$]

Year: [(NewDate) 1.4*Z]
Month: [(NewDate) 5.2*Z]
Day: [(NewDate) 7.2*Z]

Proc= MakeDates:

Modify TodaysDate = [(JulianDate) 1.8$]

Modify NewDate = TodaysDate
Modify [1.50$] = “>Define @Today ” Join [Year$] Join [Month$] Join [Day$]
Writecase

Modify NewDate = OffsetDate(TodaysDate,1,4)
Modify [1.50$] = “>Define @Tomorrow ” Join [Year$] Join [Month$] Join [Day$]
Writecase

Modify NewDate = OffsetDate(TodaysDate,-1,4)
Modify [1.50$] = “>Define @Yesterday ” Join [Year$] Join [Month$] Join [Day$]
Writecase

>Repeat $A=02,07,14,21,30,60,90
Modify NewDate = OffsetDate(TodaysDate,-$A,4)
Modify [1.50$] = “>Define @DaysAgo_$A ” Join [Year$] Join [Month$] Join [Day$]
Writecase
>EndRepeat

}

~Exc Proc= MakeDates
~In ;

&dates.std ”This shows how to access the file after you have built it

~End