DATA Step, Macro, Functions and more

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

Reply
Contributor
Posts: 20

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

[ Edited ]

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.
 
Super User
Posts: 8,213

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

Posted in reply to danielhanbitlee

Try:

libname medical "/folders/myfolders/certprep";

proc contents data=medical.lesions;
run;

Art, CEO, AnalystFinder.com

 

Contributor
Posts: 20

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

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

Super User
Posts: 8,213

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

Posted in reply to danielhanbitlee

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

 

Super User
Posts: 23,928

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

Posted in reply to danielhanbitlee

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.
 

 

Contributor
Posts: 20

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

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

Super User
Posts: 23,928

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

Posted in reply to danielhanbitlee

What chapter is the code that references medical.lesions?

Contributor
Posts: 20

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

Chapter 3 references medical.lesions.

Super User
Posts: 23,928

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

Posted in reply to danielhanbitlee

I searched for the word lesion and didn't find any results so you need to be way more specific. What section in Chapter 3, 

Contributor
Posts: 20

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

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.

 

 

 

Super User
Posts: 8,213

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

Posted in reply to danielhanbitlee

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

 

Contributor
Posts: 20

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

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

Contributor
Posts: 20

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

Posted in reply to danielhanbitlee

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

 

image.png

Super User
Posts: 8,213

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

Posted in reply to danielhanbitlee

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

 

 

Contributor
Posts: 20

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

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

 

Best,

Daniel

Ask a Question
Discussion stats
  • 14 replies
  • 179 views
  • 0 likes
  • 3 in conversation