@ucvikas wrote:
Dear experts,
I am using SAS 9.4 + SAS management consol 9.4 I have below specific questions.
1. How to create metadata libraries in batch mode . For example If my end user needs a library then I have to create that in SAS management consol manually , I want to do that by using some code where I just pass required details and its done , instead of point and click in management consol.
This is called Registering a Library in the SAS metadata server. I am not aware of any handy code or API/pre-built tool to register a new Library. If you're not afraid of coding and maintaining OMI XML requests then you may try this example :
https://support.sas.com/documentation/cdl/en/omaref/59983/HTML/default/viewer.htm#addobj.htm
Registering a new library is tricky : to be actionable , the library must be assigned to a SAS server (Application Context like SASApp). Then , there is a uniqueness constraint in the metadata server that requires that 'Library names must be unique within a SAS Application Server' :
https://support.sas.com/documentation/cdl/en/bisag/64088/HTML/default/viewer.htm#a003139364.htm (point no. 4)
Therefore, you must code some request& existence test routine to be run before trying to create a new library (the uniqueness rule applies mercilessly and generates orphans libraries objects named 'Copy Of <LIBRARY>').
In addition to this, the library once registered must be populated with tables (that means, references of tables) which, fortunately can be done quite easily using Proc METALIB :
https://support.sas.com/documentation/cdl/en/lrmeta/67971/HTML/default/viewer.htm#p1cqb9ofazns8pn1by7t2smnimsf.htm
As other members have mentioned, another way to go would be to give access to your users team - ast least to some Data Steward among them - in order to perform the manual tasks themselves. The SMC is not the only tool to register a Library.
Since you are using SAS 9.4 client/server, you might have SAS Environment Manager already deployed. This comes with a new Web console Admin (a handful of SMC plugins have been put on-line) called the EVM Admin ; the Library Module works exactly like the SMC Data Library Manager plug-in :
https://support.sas.com/documentation/cdl/en/evadmug/68379/HTML/default/p0rgl1rwibcrc3n1kxys3aa3n3b9.htm
The EVM Admin console can be accessed within the Web Environment Manager application or directly using this adress :
HTTP(s)://<sas root URL or MidTier Hostname):7980/SASEnvironmentMgrMidTier
The following permissions are required to register a new library :
access to capability : Management Console 9.4:/Plug-ins/Data Library Manager
SASApp server context authorization (through an ACT) : +RM,+WM
... View more