BookmarkSubscribeRSS Feed
ScottBass
Rhodochrosite | Level 12

Hi,

In my environment, we have numerous libraries defined via the SMC.  All of these libraries are pre-assigned.  Thus, when we launch either a Base SAS session (DMS) via the E:\SAS\Config\Lev1\SASApp\sas.bat file, or a SAS EG workspace server session, all of the libraries are automagically allocated.

Often I want to see the details of the library allocation, esp. for our Oracle libraries.  So, I RMB the library in SMC, select Display LIBNAME statement, and get the dialog:

The "Fubar" library was pre-assigned so no LIBNAME statement will be generated.

Is there any reason why SAS designed the SMC this way?  Any little birdies care to comment???  I'm sure there's a great reason for this design, I just can't think of it.

Of course the metadata server is generating libname statements (or the equivalent) when the workspace server starts, otherwise the libraries wouldn't get allocated!

But all I want to do in SMC is see the libname statement that would be generated, and usually paste it into a SAS session and change a few parameters:  for example set readonly access, or perhaps clone an Oracle library for code development, where I don't need to define it in metadata.

I'm just not getting why it's designed this way???  Just display the libname statement Smiley Wink.

Is this still the case in SAS 9.4?

Regards,

Scott


Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.
4 REPLIES 4
SASKiwi
PROC Star

I too have noticed this behaviour. Of course you can always temporarily turn off the pre-assigment so you do get the generated LIBNAME but that is not a very good workaround.

Interestingly if you check a pre-assigned library properties in EG you do get all components of the library definition displayed, but you can't copy and paste it into your code.

BTW these comments relate to SAS 9.3 M1 / EG 5.1.

Quentin
Super User

Well, google led me here only to find others have already noted this problem.

For developers, it's very useful to be able to get the libname statement behind a library defined in the metadata, particularly for optimizing access to relational databases, or writing explicit pass-through queries.  Not sure why this should be secret information. 

Sometimes it feels like SAS metadata goes too far in hiding information from developers in favor of giving it to admins.

And alas, there is no LibInfo() function.

BASUG is hosting free webinars Next up: Jane Eslinger presenting PROC REPORT and the ODS EXCEL destination on Mar 27 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
SASKiwi
PROC Star

It's the same behaviour in 9.4 M2. I am sure there would be a way of reporting this out of metadata, but it would probably take a lot of mucking around to do it. Why does it have to be so hard?

jakarman
Barite | Level 11

There is some weirdo designer or solutioneer or engineer at SAS that is insufficient thinking in concepts or is limited in a DBA like silo world. Ok that is crude, but why I am making this statement? 

I a agree with Quentin. "Sometimes it feels like SAS metadata goes too far in hiding information" not only for developers but also for admins.

There are several methods for pre-assigning libraries: http://blogs.sas.com/content/sgf/2013/05/15/pre-assign-sas-libraries-if-so-which-method/

Hiding in metadata looks nice but it the limited way a DBA of a RDBMS would prefer. the DB-admin (the A is from Admin) can control all data namings in his limited area of the dictionary(metadata).

A OS-admin is wanting all configuration items in some file ini-files (Windows registry).  It is the old confusion again what is an application?

An Admin combining those worlds should be capable to do it all. A SAS platform Admin of all kind should also be able to do that.

Some examples:

Do you want to support parallel testing (data) the physical name can not be in SAS-metadata. There must be some configuration item as a file. It can be solved as SASApp context.

Do you want or needing a SQL pass through than you are most likely needing all definitions of a libname. Not really there as Eguide query builder fiels or coding is all explicit.  

Do you want to populate metadata from a libname (extrenl dbms) you are likely needing different options as you normal user. uhhhh surprise.    

===

I would  prefer the idea of a libinfo() function passing all information back, no problem great idea.

I am promoting until now doing it the other way starting with all information libinfo() could return storing that centrally so it can be used for the libname and being modified by a developer.


---->-- ja karman --<-----

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1841 views
  • 0 likes
  • 4 in conversation