Hi,
I am at a loss as to why my macro variable DATA_FOLDER does not work
with my proc import. I have tried various combinations using a " and a
' defining the variable and in the proc import but any combination I
seem to use does not work. Here I am using single quotes defining the
macro variable and no quotes around the usage of the variable.
6721 %macro test;
6722 %let data_folder = 'c:\';
6723 libname test &data_folder.;
6724 proc import
6725 datafile = &data_folder.'test.xls'
6726 out = test.test1 dbms=excel replace;
6727 run;
6728 %mend test;
6729 %test;
MPRINT(TEST): libname test 'c:\';
NOTE: Libname TEST refers to the same physical library as ACR.
NOTE: Libref TEST was successfully assigned as follows:
Engine: V9
Physical Name: c:\
MPRINT(TEST): proc import datafile = 'c:\''test.xls' out =
test.test1 dbms=excel replace;
MPRINT(TEST): AEXC;
MPRINT(TEST): run;
ERROR: Unable to import, file c:\'test.xls does not exist.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.04 seconds
cpu time 0.03 seconds
... View more