Desktop productivity for business analysts and programmers

Viewing active libraries and filerefs

Reply
Occasional Contributor
Posts: 11

Viewing active libraries and filerefs

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...
Community Manager
Posts: 2,887

Re: Viewing active libraries and filerefs

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
Occasional Contributor
Posts: 11

Re: Viewing active libraries and filerefs

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?
Community Manager
Posts: 2,887

Re: Viewing active libraries and filerefs

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
Occasional Contributor
Posts: 11

Re: Viewing active libraries and filerefs

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;
Super Contributor
Super Contributor
Posts: 365

Re: Viewing active libraries and filerefs

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
Occasional Contributor
Posts: 11

Re: Viewing active libraries and filerefs

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;
Super Contributor
Super Contributor
Posts: 365

Re: Viewing active libraries and filerefs

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.
Occasional Contributor
Posts: 11

Re: Viewing active libraries and filerefs

Bingo!
I see ! I see! I see those librefs!
Great idea! It helps those of us going blind from squinting at this stuff...
Ask a Question
Discussion stats
  • 8 replies
  • 754 views
  • 0 likes
  • 3 in conversation