I need to import the same excel file into SAS every week, and filenames have different dates like below: file_01012021.xls file_01072021.xls
When I set up macro variables I'm getting an error due to the " ' " in the MMDDYYYY macro variable
%let MMDDYYY = '01012021'; /*Update each week*/
%let extension '.xls';
%let file = 'File_'
%let filename = &file||put(&MMDDYYYY,8.)||&extension;
proc import
out = dataset1
datafile = "/workspace/&filename"
dbms = xls replace;
run;
Are there ways to get this to work?