0

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?

Limey
  • 10,234
  • 2
  • 12
  • 32

1 Answers1

0

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;
Stu Sztukowski
  • 10,597
  • 1
  • 12
  • 21