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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
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!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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