BookmarkSubscribeRSS Feed
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.

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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

5 Steps to Your First Analytics Project Using SAS

For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.

Find more tutorials on the SAS Users YouTube channel.

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