BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
rhjordan1
Calcite | Level 5

I am trying to create libraries PG1 and NP in SAS Enterprise as specified in lesson 2. Even though I ran the autoexec files without modifying them, when I create a program under autoexec and run the code 

libname pg1 "%path";

I don't see any "pg1" under Servers --> SASApp --> Libraries. 

Also, when I create a program under process flow and run the code

libname np xlsx "%path/np_info.xlsx";

I can see NP under the list of libraries, but it does not allow me to click on it and I can't see any tables in it. When I try to do proc contents on np.Parks it says "file NP.Parks.Data does not exist." Please help.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
It should be &path (not %) and the path variable also needs to be defined above, so make sure to include that line in your code as well. If you're still having issues, post the code including the %let path= portion and your log.

View solution in original post

3 REPLIES 3
Reeza
Super User
It should be &path (not %) and the path variable also needs to be defined above, so make sure to include that line in your code as well. If you're still having issues, post the code including the %let path= portion and your log.
rhjordan1
Calcite | Level 5
Thank you!! Sometimes you just need a second set of eyes...
ballardw
Super User

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.

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

LIBNAME 101

Follow along as SAS technical trainer Dominique Weatherspoon expertly answers all your questions about SAS Libraries.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1249 views
  • 2 likes
  • 3 in conversation