4
votes

In the Server List of my SAS Enterprise Guide session I have a white (unassigned) library which I can right-click to assign. Is there a programming statement, perhaps a libname statement, or task, that I can use in an EG project to automate this step?

3
These libraries have been defined in the metadata, probably through the SAS Administrator software (forgot exact name). If i recall, there you can configure if a library should be loaded immediately or not. So if you have admin rights, you can change it for certain.mvherweg

3 Answers

5
votes

Open SAS Management Console.

Go to Data Library Manager, find the library you want to modify, right-click for Properties.

Go to Options tab - click Advaced Options button - check Library is Pre-Assigned checkbox.

You should have METAAUTORESOURCES option enabled on your application server.

4
votes

On the presumption that your libraries are white but already assigned - ie that you have to right-click 'assign' to gain access (and they turn yellow). You can automatically assign in code using a 'meta' libname statment. Something along the lines of this should work:

libname MYLIB meta LIBRARY=MYLIB;

Of course you could change the 1st MYLIB to any lib reference you want but it makes sense to keep them the same as the pre-assign by IT.

2
votes

Open SAS Enterprise Guide

Tools --> Options

Go to SAS Programs in left pane

Check box next to Submit SAS code when server is connected

Go to Edit next to Submit SAS code when server is connected

Add libname statement libname lib 'directory';

Save

Hope this helps.