I am trying to take a semi-automated code to become fully automated. Currently we have .txt files dropped daily in a folder with the naming convention FILE1_DS1_20181212_20181212.txt, sometimes this last part of the name is a range such as FILE2_DS1_20181210_20181212.txt. Currently, every morning when I run the code I change the macro variables to match the correct dates which are needed (i.e %LET FILEDTE1=20181210, %LET FILEDTE2=20181212) so the files read in correctly. Is there a way for SAS to automatically pull those date values from the .txt file name? The date variables are later used in imports and outputs. FYI for more information we have 100+ text files that have this naming convention which are processed daily. I'm trying to account for data drops that cover the weekend, and other reasons,such as holidays, that may cause a date range. Thank You!
... View more