Here i'm having a dataset in which i have variables called libref and path like below
libref path
macro 'ahcb/ajbj/new
base c:/apth/sai
advance d:/sail/new
here i wont create macro, base and advance as libraries.i have used call execute but i'm getting errors.
thanks a ton.
When yout get ERRORs (or WARNINGs or other messages) you do not understand, always (and I mean ALWAYS) post the whole log of that step (or macro definition and execution) by copy/pasting into a window opened with the </> button.
So please show us your log.
You do not need a macro, you can use the LIBNAME function in a data step that reads your dataset.
As @Kurt_Bremser remarked, you can use the LIBNAME function, e.g.:
Data _null_;
set librefs; /* or whatever your data set is named */
if libname(libref,path) then do;
msg=sysmsg();
put msg;
end;
else
put 'Libname ' libref 'was assigned to path ' path;
run;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.