BookmarkSubscribeRSS Feed
danielhanbitlee
Calcite | Level 5

Hi everyone,

 

I am having a hard time loading certain datasets. I am going through the book SAS Certification Prep Guide Base Programming Fourth Edition. I am on chapter 3, where it talks about proc contents. Specifically, I am trying to run the following command:

 

proc contents data=medical.lesions; 
run;

When I run this, I get the following error:

 

 ERROR: File MEDICAL.LESIONS.DATA does not exist.

All the codes before this worked fine. I am using SAS Studio on Windows 10 Google Chrome browser. I followed instructions from the book on how to load all the datasets that will be used in the book. I followed the steps outlined in chapter 1 of the book. That is, I followed the following steps:

 

If you are using SAS Studio, do the following:
  1. Right-click the new folder that you created and select Properties.
  2. Copy the path in the Location field.
  3. Enter the following code, replacing location field with the path that you copied from the Location field.
    libname sasuser "location field";
  4. Click Run.
  5. Save the program as libname_cert.sas. You must resubmit this LIBNAME statement program every time you work with the sample data.
  6. Copy the sample data program into a new Code window in SAS Studio. You can access the sample data at http://support.sas.com/publishing/cert/sampdata.txt.
  7. Click Run.
     
The location is "/folders/myfolders/certprep". I still get an error message.
 
Any help would be appreciated.
 
14 REPLIES 14
art297
Opal | Level 21

Try:

libname medical "/folders/myfolders/certprep";

proc contents data=medical.lesions;
run;

Art, CEO, AnalystFinder.com

 

danielhanbitlee
Calcite | Level 5

I tried that and it still doesn't work...

art297
Opal | Level 21

If you click on Server Files and Folders, on the left side of the screen, under myfolders can you see the library and/or file that you are trying to access? It's possible that you misspelled it when you loaded it.

 

Art, CEO, AnalystFinder.com

 

Reeza
Super User

The link doesn't show a data set lesions either. Are you sure you're supposed to run the code you're mentioning and it's not just a demo section?

What page in the books is it in, and what version do you have?

 


@danielhanbitlee wrote:

Hi everyone,

 

I am having a hard time loading certain datasets. I am going through the book SAS Certification Prep Guide Base Programming Fourth Edition. I am on chapter 3, where it talks about proc contents. Specifically, I am trying to run the following command:

 

proc contents data=medical.lesions; 
run;

When I run this, I get the following error:

 

 ERROR: File MEDICAL.LESIONS.DATA does not exist.

All the codes before this worked fine. I am using SAS Studio on Windows 10 Google Chrome browser. I followed instructions from the book on how to load all the datasets that will be used in the book. I followed the steps outlined in chapter 1 of the book. That is, I followed the following steps:

 

If you are using SAS Studio, do the following:
  1. Right-click the new folder that you created and select Properties.
  2. Copy the path in the Location field.
  3. Enter the following code, replacing location field with the path that you copied from the Location field.
    libname sasuser "location field";
  4. Click Run.
  5. Save the program as libname_cert.sas. You must resubmit this LIBNAME statement program every time you work with the sample data.
  6. Copy the sample data program into a new Code window in SAS Studio. You can access the sample data at http://support.sas.com/publishing/cert/sampdata.txt.
  7. Click Run.
     
The location is "/folders/myfolders/certprep". I still get an error message.
 
Any help would be appreciated.
 

 

danielhanbitlee
Calcite | Level 5

Hi Reeza,

 

Thank you for the response. I'm using the fourth edition of SAS Certification Prep Guide Base Programming. The instructions with the link http://support.sas.com/publishing/cert/sampdata.txt is from chapter 1. I don't know the page number because I'm using an online version of the book via Safari Books Online (safaribooksonline.com).

 

Best,

Daniel

Reeza
Super User

What chapter is the code that references medical.lesions?

danielhanbitlee
Calcite | Level 5

Chapter 3 references medical.lesions.

danielhanbitlee
Calcite | Level 5

Sorry about that. And thank you again for looking into this.

 

I'm looking at the subsection "Viewing SAS Libraries" in chapter 3 titled "Setting Up Your SAS Session". Inside the subsection "Viewing SAS Libraries", medical.lesions is mentioned in the "Examples: PROC CONTENTS Output" section.

 

This is from SAS Certification Prep Guide: Base Programming for SAS 9 Fourth Edition published in 2017 and updated last on January 10, 2018. I am accessing this resource through safaribooksonline.com.

 

 

 

art297
Opal | Level 21

I don't have access to safaribooksonline and am using SAS University Edition. With the first page you showed in your earlier post I was unable to get it to run, error free, without making a number of changes to the code.

 

What version of SAS are you using?

 

Art, CEO, AnalystFinder.com

 

danielhanbitlee
Calcite | Level 5

I am using SAS Studio University Edition. It's the latest one, so SAS 9.4? I attached a screenshot of the page that references medical.lesions.

 

image.png

danielhanbitlee
Calcite | Level 5

And the second part of the page that has medical.lesions code.

 

image.png

art297
Opal | Level 21

The code you initially provided didn't create a MEDICAL library. And, as I mentioned earlier, I was only able to get it the original code to run on SAS UE by assigning SASUSER to the library '/folders/myfolders' and changing a number of the file names to precede with a / rather than a \

 

I can't post the revised code here as it exceeds to 200,000 character limitation allowed for forum posts.

 

However, I could send it to you directly if you send me an email (to art@analystfinder.com).

 

Art, CEO, AnalystFinder.com

 

 

danielhanbitlee
Calcite | Level 5

 I see. Thank you for helping me out on this. I sent you an email just now.

 

Best,

Daniel

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 14 replies
  • 1674 views
  • 0 likes
  • 3 in conversation