Hi Folks - I am new to SAS macros. My task is to import csv file to SAS data set. I get new file every morning for example 1. Category_-_Yesterday-11-01-19-0907.csv 2. Category_-_Yesterday-11-02-19-0904.csv 3. Category_-_Yesterday-11-03-19-1016.csv 4. Category_-_Yesterday-11-04-19-0925.csv 5. Category_-_Yesterday-11-05-19-0816.csv file pattern is like = Category_-_Yesterday-&today-RandomNumbers i tried braking this but it doesn't work. It is not able to read RandonNumbers %let today=%sysfunc(today(), MMDDYYD8.); %let file=Category_-_Yesterday-&today-; %let extension= "*".csv; %let file_loc=\C:\myfile\&statusfile.&extension.; %put &today.; %put &extension.; %put &file.; %put &file_loc.; filename DIRLIST pipe &file_loc ; run; Can someone please help me on how to read date and random numbers in file name and automate the import process. Thanks for your help !! $file
... View more