SnippyMcPhail
Programmer
- Apr 24, 2009
- 2
So I'm trying to pull in an excel file from the company directory. Unfortunately there is a an "&" in the file name that I'm unable to alter. Its near the root of the structure and I don't have access below that point to store files.
Normally, the solution would be to use single quotes and directly quote the file name. I need to be able to use macro variables to automate a process of bringing in a file that is of the previous month.
How can I successfully pull this file in without SAS assuming that C is a macro variable?
Normally, the solution would be to use single quotes and directly quote the file name. I need to be able to use macro variables to automate a process of bringing in a file that is of the previous month.
How can I successfully pull this file in without SAS assuming that C is a macro variable?
Code:
/*Import File For Previous Month */
proc import out=os.input
datafile = "\\cmutual.com\fsroot\MPR\MSG\MP&C\EAGLE\Onsite Marketing Reporting\Onsite Monthly Reports\&short_year.\Input\Onsite_Lift_Monthly_&yyyymm..xls"
DBMS=Excel2000 REPLACE;
Sheet = "ALL";
run;