BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
keydet51
Calcite | Level 5

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:

LIBNAMEAAEM 'SAS:\Servers\SASApp\Libraries\AAEM';

DATA AAEM.BANK;

run;

proc print data=AAEM.BANK;

run;

Any help on this subject is greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

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

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

View solution in original post

7 REPLIES 7
ChrisHemedinger
Community Manager

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

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
keydet51
Calcite | Level 5

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

ChrisHemedinger
Community Manager

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

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
keydet51
Calcite | Level 5

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

ChrisHemedinger
Community Manager

Will,

Maybe try:

libname AAEM meta library="AAEM" access=readonly;


And see how that does...


Or,


libname AAEM meta library="AAEM" metaout=data;


Chris

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
keydet51
Calcite | Level 5

Chris,

I got it it to work. Thank you for your help.

Will,

boop
Calcite | Level 5

Could you post what you found out please? It would help other people looking at this post!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 4374 views
  • 7 likes
  • 3 in conversation