BookmarkSubscribeRSS Feed
Bpotter136
Calcite | Level 5

In Programming I Essentials, I am using SAS Studio. The instructions are confusing. I had to use this line of code to get the NP library to appear correctly: 

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

 Seems like the instructions say something else for using SAS Studio. Could you look into this issue please? 

 

Perform the following tasks in your SAS software:

  • Open a new program window.
    Write a LIBNAME statement to create a library named NP that reads np_info.xlsx in the course data as follows:
    • SAS Studio: Specify the full path to your EPG1V2/data folder and the complete file name.
    • Enterprise Guide: Specify &path and the complete file name.
  • Run the LIBNAME statement.
    Navigate to your list of libraries and open the NP library. How many tables are there in the NP library?
     
libname np xlsx "FILEPATH/np_info.xlsx"; 
/* Enterprise Guide: */
libname np xlsx "&path/np_info.xlsx"; 
There are three tables in the NP library: Parks, Species, and Visits.
  • Write an OPTIONS statement to ensure that column names follow SAS naming conventions.
    Write a PROC CONTENTS step to read the Parks table in the NP library.
    Add a LIBNAME statement after PROC CONTENTS to clear the NP library.
    Run the program and examine the log. Which column names have been modified to follow SAS naming conventions?
options validvarname=v7;
proc contents data=np.parks;
run;
libname np clear;

Park Code
 changed to Park_Code and Park Name changed to Park_Name.
2 REPLIES 2
ballardw
Super User

What does the value of &path look like?

If you aren't sure you should be able to submit code:  %put Path is: &path; and value should appear in the log as Path is: <something here>

 

If &path looks like a drive and some folders then that is exactly what is meant by

Specify the full path to your EPG1V2/data folder

And the file name is np_info.xlsx. The macro variable &path apparently has the Text needed to be equivalent to "FILENAME".

 

I suspect that the documentation may not be quite keeping up with the installation program contents.

Bpotter136
Calcite | Level 5
I think your last sentence clarifies this issue for me. It looks like the instructions may need to be updated. I got the practice done; don't want others to get frustrated or complain.

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →
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
  • 2 replies
  • 2764 views
  • 0 likes
  • 2 in conversation