What does your LOG show?
An example of my output with similar code:
102 libname junk "%outpath";
WARNING: Apparent invocation of macro OUTPATH not resolved.
That message indicates there should have been executed in the current session some code somewhat like to define a macro call
%mend outpath;
<some statements go here>
%mend;
So your session would need something starting %mend path; and execute the code through the %mend; statement.
Are you sure that you are supposed to use %path? I would more often expect to see a macro variable &path defined with a %let statement somewhere.
You should show the LOG that results from executing those Libname statements.