I have an excel file which contains libnames and i need to extract libnames from excel and create macro variable to call libnames.
I use proc import to import the libnames and then use the below code but since my libname has ":" it gives error
! C:\Programming\check
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, ;, CUROBS, END, INDSNAME, KEY, KEYRESET, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.
/* Concatenate the list of LIBNAMEs into a single macro variable */
data _null_;
set libname_list;
if _n_ = 1 then call symputx('libnames', Href);
else call symputx('libnames', symget('libnames') || ' ' || Href);
run;
/* Create a macro variable to call the assigned LIBNAMEs */
%let libnames_list = &libnames;
/* Perform some action on the assigned LIBNAMEs */
data _null_;
set &libnames_list;
run;
Can anyone help on how to create macro which can be called on each program to get libnames
... View more