SAS Enterprise Guide

Desktop productivity for business analysts and programmers
BookmarkSubscribeRSS Feed
WhiteSalmon
Calcite | Level 5
Is there a lib window and a fileref like in DM? I'm new to EG and its 4.1. I wrote a sql dictionary statement to find the librefs for the code I've inherited but think there should be a button somewhere...
8 REPLIES 8
ChrisHemedinger
Community Manager
You can use Tools->SAS Enterprise Guide Explorer to see the active libraries. Unfortunately it's a "modal" window, which means you can't interact with EG while this window is displayed.

You can also use View->SAS Servers and expand the server list and library list, but you'll need to Refresh it whenever you make a change that you want to see reflected.

There isn't a built-in window to show active filerefs.

Chris
Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!
WhiteSalmon
Calcite | Level 5
OK Thanks Chris,

Because the window has a zillion little filedrawers in the window I didn't see that there was some yellow ones that are my active libs and my friend Thomas texted me from afar that I MUST refresh with the right click.

Is there sas code to write to find the active filerefs?
ChrisHemedinger
Community Manager
Here's one example of getting a list of active filerefs. The WHERE clause filters out the system-generated filerefs you might not care to see.

[pre]
proc sql;
create table currentFiles as
select fileref, xpath, modate, directory from dictionary.extfiles
where substr(fileref,1,1) ne "#";
quit;
[/pre]

Chris
Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!
WhiteSalmon
Calcite | Level 5
Chris:
Thanks for the code, it didn’t quite work on my system.

proc sql;
15 create table currentFiles as
16 select fileref,
17 xpath, modate,
18 directory
19 from dictionary.extfiles
20 where substr(fileref,1,1) ne "#";
ERROR: The following columns were not found in the contributing tables: directory, modate.


This is what worked:

proc sql;
create table currentFiles as
select *
from dictionary.extfiles
where substr(fileref,1,1) ne "#";
quit;
SPR
Quartz | Level 8 SPR
Quartz | Level 8
Hello WhiteSalmon,

From my experience with EG, it is a good idea to have an underscore as a first character of a user library name. In this case this library is always displayed on the top of the library list.

Sincerely,
SPR
WhiteSalmon
Calcite | Level 5
Thanks for that SPR:

I tried that tip and used this code to review but it didn't seem to land my _mylib
on top of that list :

title "Current Libraries";
proc sql;
select distinct(libname)
from sashelp.vlibnam;
quit;
SPR
Quartz | Level 8 SPR
Quartz | Level 8
I meant the library displayed on the top of library portion of the Server list. You can access the Server List by selecting View -> Server. Then double click on Servers, then of the server which you use, then on Libraries, and you will see this library list.
WhiteSalmon
Calcite | Level 5
Bingo!
I see ! I see! I see those librefs!
Great idea! It helps those of us going blind from squinting at this stuff...

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 8 replies
  • 9616 views
  • 0 likes
  • 3 in conversation