BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Phil_NZ
Barite | Level 11

Hi SAS Users,

 

The interface Serve is very useful for me because apart from it can link me to all the SAS datasets in my computer, but I can also see all datasets inside all the libraries. Super convenient!!

My97_0-1614985536417.png

I just wondering, if SAS EG stores a lot of datasets like that, whether it costs the RAM or else?. And what is the directory for these datasets (I mean physically access).

 

Warmest regards.

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

This will show where all your libraries are physically located:

 proc sql;
    select distinct libname, path
    from dictionary.libnames
    ;
quit;

(or open the view sashelp.vlibnam)

No clue what overhead may be in the EG metadata management because of the connection to server. The server maintains the actual metadata and provides it when needed.

View solution in original post

9 REPLIES 9
ballardw
Super User

This will show where all your libraries are physically located:

 proc sql;
    select distinct libname, path
    from dictionary.libnames
    ;
quit;

(or open the view sashelp.vlibnam)

No clue what overhead may be in the EG metadata management because of the connection to server. The server maintains the actual metadata and provides it when needed.

Phil_NZ
Barite | Level 11

Thank you @ballardw 

Very useful code, I can see the bigger picture now. Thank you for broadening my horizon.

 

Warmest regards.

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
mkeintz
PROC Star

A possibly useful tip.   Because I work in an environment with many libraries, sorted alphabetically, often WORK appears below the bottom of the LIBRASRIES list.    I avoid scrolling by providing an alias libname for WORK:

 

libname _w (work);

which sorts at the top.

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
Phil_NZ
Barite | Level 11

Hi @mkeintz 

It is a very nice and hands on suggestion, I will apply for sure.

However, can I ask how to apply it globally in my SAS EG

I type the code given

libname _w (work);

then execute it, however, there is nothing change from the Serves interface.

My97_0-1615014229029.png

 

Could you please hint me about this issue?

 

Warm regards.

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
mkeintz
PROC Star

@Phil_NZ wrote:

Hi @mkeintz 

It is a very nice and hands on suggestion, I will apply for sure.

However, can I ask how to apply it globally in my SAS EG

I type the code given

libname _w (work);

then execute it, however, there is nothing change from the Serves interface.

My97_0-1615014229029.png

 

Could you please hint me about this issue?

 

Warm regards.


After executing the statement, click on "libraries", then on the "refresh" icon.  

 

You can make this automatic by putting the statement in an autoexec.sas file.   See Autoexecs - the SAS Enterprise Guide advantage. I would choose the option under "Setting up a user-specific autoexec".  

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
Phil_NZ
Barite | Level 11

Hi @ballardw 

Can I ask why do you use the "distinct" in the code given?

Normally, when dealing with the dictionary, I just see people use select column names, it is the first time I see the use of distinct here. Could you please explain why you use distinct here?

 

Warm regards.

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
ballardw
Super User

@Phil_NZ wrote:

Hi @ballardw 

Can I ask why do you use the "distinct" in the code given?

Normally, when dealing with the dictionary, I just see people use select column names, it is the first time I see the use of distinct here. Could you please explain why you use distinct here?

 

Warm regards


Learning point: Run it without distinct and see what you get.

 

The libname path are repeated in that particular view because of multiple values for the Sysname and Sysvalue variables which you might include to find out stuff like the Filename (in the case of libraries that point to files such as XLSX), Owner Name, or File size which has two options for reporting K or bytes. If you added one of these variables you wouldn't need distinct to only have one libname path combination.

 

 

SASKiwi
PROC Star

Please bear in mind that Enterprise Guide is merely a user interface. It is not the software processing your data. In your case you have a local SAS server running on your PC doing all the work and EG is just managing that and showing results. Open Windows Task Manager (right click on Windows Task Bar and select) and you will see separately EG and the SAS server both using different amounts of memory and CPU. 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 555 views
  • 6 likes
  • 5 in conversation