- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content