BookmarkSubscribeRSS Feed
Shiauyin
Calcite | Level 5

Hi,

 

I am using Enterprise Guide (8.3) and following the course SAS programming 1 to create a library.   The library NP was created successfully (according to the log) but I cannot see it on the local libraries list.  Anyone where to find the library I created and why it's not in the local libraries list?  ?  

 

Shiauyin_0-1664145170648.png

 

14 REPLIES 14
Shiauyin
Calcite | Level 5

C:\Users\yinyi\AppData\Roaming\SAS\EnterpriseGuide\EGTEMP\SEG-5936-d45e8d98\contents\SAS Temporary Files\_TD12648_DESKTOP-IBUTM48_\Prc2

Kurt_Bremser
Super User

So you try to access an Excel file in your physical WORK directory. How did you store it there?

 

Note: if you copied the file to the WORK location in a previous SAS session, it's gone now, as the WORK directory is removed at the end of the session, and a new one created when a new session initiates.

Shiauyin
Calcite | Level 5

Hi Kurt,

 

I was just trying to follow the activity in the programming 1 (lesson 2).

 

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?

Answer: 

/* Enterprise Guide: */

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

 

In the SAS studio, I can easily find the NP library in the Libraries folder.  But in Enterprise Guide, I simply don't know where location of the library I created and how to get access to it.

 

 

jebjur
SAS Employee

After you submit the LIBNAME statement in Enterprise Guide, sometimes you need to right-click on your 'Local' server in the server list and select 'Refresh' in order to see the newly created library. Does that allow the NP library to show in the list?

Ericv123
Calcite | Level 5

I have the exact same issue as previous poster.  Log shows that my Libname statement is correct and 'NP" library is created but not populated in the list of libraries (even after I refresh)

Tom
Super User Tom
Super User

@Ericv123 wrote:

I have the exact same issue as previous poster.  Log shows that my Libname statement is correct and 'NP" library is created but not populated in the list of libraries (even after I refresh)


if you make a libref using the LIBNAME statement and the XLSX engine that points to an XLSX file SAS does NOT know whether your intent was to READ from an EXISTING file.   So if the filename you used does not exist then the LIBNAME statement is successful but the file will exist until you actually WRITE something into it.

jebjur
SAS Employee

Just to verify, if using Eguide 8.3, do you have the latest update applied? Also, make sure you are submitting your code to the correct server (if you have the ability to submit to multiple workspace servers).

 

For example, if I submit this code in Eguide:

 

jebjur_0-1664314832208.png

 

make sure at the top of the program editor that you are submitting to the Local server:

 

jebjur_1-1664314911551.png

The library should appear in the server list:

 

jebjur_2-1664315016881.png

 

Shiauyin
Calcite | Level 5

Hi Jebjur,

This is what I saw.  I still cannot find where the NP I created.  

Shiauyin_0-1664425028622.png

 

Kurt_Bremser
Super User

You have an incorrect path in your macro variable &PATH. It should NOT point to your WORK, but to the location of the Excel file.

Review the setup instructions and follow them.

jebjur
SAS Employee

I would first take a look at the value of the &PATH macro variable with code such as the following, and browse to this location outside of Enterprise Guide (using windows explorer) to verify the NP_INFO.XLSX file actually exists.

 

%LET PATH=%sysfunc(pathname(WORK));
%PUT &PATH; /* will write the value of macro variable to the log */

 

If it doesn't, then you need to rerun the program that creates all of your external files and SAS data sets you use in the class.

 

If the file exists in the appropriate location, then change the '/' in your code to a '\' like the following and try again.

 

LIBNAME NP XLSX "&path\np_info.xlsx"

Ericv123
Calcite | Level 5

Issue was resolved by a system reset overnight.  Shut down and reboot to apply other corp updates and patches unrelated to Linux servers or my SAS EG instance.  Unclear why this resolved the issue but it did...

Shiauyin
Calcite | Level 5
I clicked the "refresh " a few times but the NP still not in the the libraries directory.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 14 replies
  • 5165 views
  • 2 likes
  • 5 in conversation