Where are these libraries defined? If they are only assigned in EG then your SAS program cannot reach back into your PC and ask EG what libraries you defined. If they are defined in your SAS Metadata server then you should be able to discover them, but I don't know how since I don't use that feature of SAS.
Why not just put in the SAS code to define the libraries? Do you know how they are defined?
If you want to have some control then place these statements in a place where you code and find them and just use %INCLUDE statement to pull in the code and run it.
Or are you talking about SAS connection session? Where there are some libraries defined in the local session and you want to reference those locations in the remote session? Not sure how to do that but it is easy to do it the other way using the REMOTE engine on the libname statement.
... View more