Desktop productivity for business analysts and programmers

Assign libraries using Server List entries

Reply
Occasional Contributor
Posts: 11

Assign libraries using Server List entries

SAS EG is a new environment for me and I am intrigued by the Server List window and its entries. As a concept they seem to me to represent objects, perhaps a loose abuse of terminology, which contain the elements of what constitute a LIBNAME statement in code, but are maintained by the SAS 'DBA'. Presumably their contents represent the most efficient means of assigning the libraries taking into account the overall system environment and hence the parameters have been established by the 'DBA'.

Most programs which I am dealing with contain, in the header comment section, a list of libraries to be assigned, i.e. where their icon is not coloured yellow by default. Is there a mean whereby one can programmatically from with a SAS program apply the Assign method to such libraries. Seeing as most of the entries in my Server List are coloured yellow, and hence pre-assigned, that would be happening from a configuration or autoexec process so I feel it must be possible. Having to manually right mouse click and the Assign libraries seems somewhat inefficient, e.g. if one forgets to assign all referenced libraries then the program bombs.

I guess the alternate approach would be to copy the fields on the Properties window for a particular library into a LIBNAME statement but then if the DBA changes the properties to something else such a LIBNAME statement would no longer correspond with the contents of the Server List entry.
Occasional Contributor
Posts: 11

Re: Assign libraries using Server List entries

May I also add another query about the Server List window? Presumably there is a configuration file or catalogue entry containing its contents. If so can it be read by a data step and how does one reference it?
Community Manager
Posts: 2,696

Re: Assign libraries using Server List entries

Josh,

Welcome to EG.

First, there is not really a way to programmatically read the contents of the Server List window.

The libraries you see there are:
- live libraries, yellow icons, already assigned
- "potential" libraries, defined in metadata, not yet assigned but that EG will assign on-demand as you interact with them. These are white icons instead of yellow. Hope your eyes are good enough to catch the subtle difference.

To write SAS programs that use these libraries, obviously they must be assigned. You can assign in code or petition the SAS administrator to mark the library you need as "pre-assigned" in metadata, which will cause SAS to assign it when you invoke your workspace session.

There is lots more information in the SAS BI Administration Guide; check the chapters about the desktop clients.

Chris
Ask a Question
Discussion stats
  • 2 replies
  • 121 views
  • 0 likes
  • 2 in conversation