I have a question regarding library mapping and Macro variables. The situation is that I would like to dynamically map libraries within a Macro based upon user inputs. The error I am encountering is that when I attempt to combine two Macro variables, I receive an error from the libref function. Here is a short-code example: /*declare test macro variables*/ %let st_yr = 1999; %let loc = y:\data\ %let loc2 = "y:\data\1999 /*test string manipulation*/ %let test = %str(%"&loc.&st_yr.%"); %put &loc2.; %put &test.; /*NOTE: loc2 and test should be equivalent strings*/ /*map libraries*/ libname test1 &loc2.; /*No error and maps library*/ libname test2 &test..; /*ERROR: "Libref in LIBNAME statement must be followed either by quoted string or engine name or semicolon; """ found. Does anyone have advice on what is happening. I thought the two periods after the &test in the libname state would resolve the issue, but it doesn't. regards
... View more