I am trying to practice my programming for the base certification exam and I cannot seem to access the data in the libraries that came with EG 6.1. The SAS certification prep guide says use the libref.filename statement but it says the library I am accessing does not exist. The libraries and data I am trying to access is located on the SASapp server. Do I need to define the libraries path in a LIBNAME statement to let my program know the physical location of the library I am trying access. For example I am running a program that reads as follows:
LIBNAME | AAEM 'SAS:\Servers\SASApp\Libraries\AAEM'; |
DATA AAEM.BANK;
run;
proc print data=AAEM.BANK;
run;
Any help on this subject is greatly appreciated.
Will,
How about this:
libname AAEM meta library="AAEM";
This will use the library metadata to assign the library, and you won't need to know the physical path.
Chris
I think the library you're trying to access is for use with SAS Enterprise Miner (not SAS Enterprise Guide) -- at least, within the SAS OnDemand environment. Is that what you're using?
The LIBNAME path that you specify must map to a physical path on the host system where your SAS session is. In the SAS OnDemand environment, you might try this:
libname aaem “/tutorials/em/data/aaem”;
(I found that in some support material -- I don't know if it's available in your environment.)
If running everything locally, I'd expect the LIBNAME path to be a local path such as:
libname sample "C:\Program Files\SASHome\x86\SASEnterpriseGuide\6.1\Sample\Data";
That's the EG sample data -- not the EM sample that might enclosed the BANK data you reference.
Chris
Chris,
I am using SAS EG 6.1 which is the one that came with the SAS on demand academics for students. I understand that I have to specify the physical location of the data being accessed. I am trying to access it from the server and I clicked on properties of the library AAEM which reads:
Type: Library
Server: SASApp
Engine: BASE
Location: /Shared Data/Libraries/AAEM
Options: ACCESS=READONLY
Libref: AAEM
Read Only: Yes
Tempory: No
What is the appropriate Syntax that will allow me to access the data and print it.
Thank you for all your help
Will
Will,
How about this:
libname AAEM meta library="AAEM";
This will use the library metadata to assign the library, and you won't need to know the physical path.
Chris
Chris,
Thank you so much for your help and patience as this is the correct code. However, I am denied access to the BANK data. The error message reads, "Write access to member AAEM.BANK.DATA is denied." I can access the data when I physically go into the library and click on it but it is not letting me access it through the code. Any reason as to why this is? Thanks again for all your help.
Will
Will,
Maybe try:
libname AAEM meta library="AAEM" access=readonly;
And see how that does...
Or,
libname AAEM meta library="AAEM" metaout=data;
Chris
Chris,
I got it it to work. Thank you for your help.
Will,
Could you post what you found out please? It would help other people looking at this post!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.