Reputation: 11
I try to read a csv file with this code:
%let path= C:\Users\b\file_holidays;
libname bic "&path.\input";
proc iml;
submit bic / R;
bankholidays=read.csv(file.path(bic, "Bankholidays.csv"))
endsubmit;
quit;
but I have the error
"object 'bic' not found".
May you help me?
Upvotes: 0
Views: 68
Reputation: 12909
bic
is a libref and is not a parameter within IML. You can simply reference the path of your libname, assuming that is where you want to output sas7bdat files later. Otherwise, you do not need the libname statement.
%let path= C:\Users\b\file_holidays;
libname bic "&path.\input";
proc iml;
submit / R;
bankholidays=read.csv(file.path("%sysfunc(pathname(bic))", "Bankholidays.csv"))
endsubmit;
quit;
Upvotes: 0