Using the proc metalib process to update specific elements would generate errors related to the base SAS Library conflicting with the Metalib referenced library. You can run a libname _all_ list; statement to review all the libraries available to the process. Also, the reference material utilized to improve the process wasn't taking into consideration the use of these proc metalib statements via batch programming.
The final code below provides a mechanism to define a meta data libname statement, update/select/delete metadata information using proc metalib, and then clearing the libname statement.
(Note - the credentials are defined as macros separately on the server.)
libname _temp meta repname="Foundation" port=8561 ipaddr="&host;" USERID= "&user;" PW= "&pass;" library="SASHELP" metaout=data; proc metalib; omr (library="SASHELP" metaserver="&host;" user = "&user;" password = "&pass;"); select("SHOES"); run; libname _temp clear;
Reference: What SASĀ® Administrators Should Know about Libraries, Metadata, and SASĀ® Enterprise Guide 4.1 http://support.sas.com/techsup/technote/ts788.pdf
2 Comments
Hi Angela,
I am new to the SAS BI horizon and thus am being confronted with few issues and concepts which needs to be cleared.I was recently reading the " Building Business Intelligence using SAS" book whereby it is stated that metadata libraries can be created in EG and that the library can be asigned using EG(libname statement),Metadata libname engine or via SAS Server.The SAS server choice is to be used when "library is already assigned".Can you help me understand this?
Thanks
Ranajoy
Thanks Ranajoy for getting a copy of my book!
If the library is already assigned, that means that when the Object Spawner started on the server, it initiated the library already.
Several mechanisms can do this:
1. In the metadata definition (viewable from SAS Management Console) the library is set to preassign.
2. In an autoexec.sas file (there are several) the libname has been included.
(More detail and screenshots are found at: http://support.sas.com/documentation/cdl/en/bidsag/65687/HTML/default/viewer.htm#p0u8xcdo2ll3kmn1oqfz2s0ybooq.htm)
An important item to note, is that when the library is preassigned, it is using a shared account (SASSRV) to see the physical tables or connect to the RDBMS. Therefore SASSRV must have read access to these tables.
Hope this helps you!
~ Angela