First a minor comment: Storing SAS code in a WORD document, or other spreadsheet, is next to dangerous. Some of the word processing programs will replace simple programming quotes like ' with a curly quote (or apostrophe) that looks nice in print but means code will not run.
An example at : https://communities.sas.com/t5/SAS-Programming/Smart-Quotes-Vs-Simple-Quotes/m-p/396099
Also some text formatting stuff that you don't see can affect things.
SAS has function, Today() that will return the value of the current date that the statement executes. So you can test or modify that value with date functions to create other text such as the names of files and such, or to increment a base value to select values with a specific range of days(or weeks, months or years) of that value with the INTCK and/or INTNX functions.
Since you did not show any example of how you might actually use the date value it is hard to go much further than that.
If your code is static enough you might be able to use a CALL EXECUTE approach which would let you use a data set containing the main part of the code and insert the appropriate date values into the statements that would depend on the date.
Another approach is to write the code to use macro values for the date dependent bits and then the program at the top would use the Today function and other statements to set the date dependent bits. Again, it might help to show which parts of your code need to change and the rules involved.
... View more