libname np xlsx "/home/rachelgabbard0/EPG194/data/np_info.xlsx";
/* Enterprise Guide: */
libname np xlsx "&path/np_info.xlsx";
this is my code and this is the warning I get
WARNING: Apparent symbolic reference PATH not resolved.
I am in the essentials course and am trying to learn SAS for work.
Hello,
&path -- This is referencing a macro variable, you need to learn about macros in SAS.
Macro variable 'path' has to be defined first in order to reference it later.
For example:
%let path = /home/rachelgabbard0/EPG194/data;
options symbolgen;
libname np xlsx "&path/np_info.xlsx";
Here the Symbolgen option will tell you the values that was replaced in place of the macro reference in log.
In log:
SYMBOLGEN: Macro variable PATH resolves to /home/rachelgabbard0/EPG194/data
This means &path was replaced by /home/rachelgabbard0/EPG194/data
&path in this case is a macro variable
However, the error message indicates that macro variable &path does not exist, and so it can't be used.
Thus you have to give &path a value (it's probably a folder name where the Excel file np_info.xlsx is stored). So on my computer, I could use this line of code at the start of my program:
%let path=c:\users\pmiller\documents;
Naturally, your value for path will be different.
Hello,
&path -- This is referencing a macro variable, you need to learn about macros in SAS.
Macro variable 'path' has to be defined first in order to reference it later.
For example:
%let path = /home/rachelgabbard0/EPG194/data;
options symbolgen;
libname np xlsx "&path/np_info.xlsx";
Here the Symbolgen option will tell you the values that was replaced in place of the macro reference in log.
In log:
SYMBOLGEN: Macro variable PATH resolves to /home/rachelgabbard0/EPG194/data
This means &path was replaced by /home/rachelgabbard0/EPG194/data
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.