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

I am studying with this book 'SAS Certified Specialist Prep Guide: Base Programming Using SAS 9.4'

using the universal edition of SAS studio.

I did this problem with 'proc import file='

it didn't work and the solution of the book is below;

It creates the library but not file. please, someone knows the reason, explain to me.

scenario 6.GIF

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Please post your logs in the future not as pictures, but by copy/pasting the log text into a window opened with the </> button:

Bildschirmfoto 2020-04-07 um 08.32.59.png

 

From the contents of your picture, I take it that you use University Edition in a virtual machine. To address files in the shared folder, you need to use the internal path of the VM, which is /folders/myfolders. The VM is a UNIX system, uses UNIX filename syntax, and does not have access to your local drives, only to the shared folder.

View solution in original post

7 REPLIES 7
Jagadishkatam
Amethyst | Level 16

could you please check the tab name or excel sheet name in heart.xlsx, is there a tab name or excel sheet name as heart.

in order for you to read the excel file via libname you need to know the sheet name and use that sheet name as input dataset in set statement.

 

to know the different sheet names in the excel file try

 

proc datasets lib=certdata; 
quit;

This will give you the different table or sheet names in that excel file.Once you know the name replace that name in set certdata.xxxx

Thanks,
Jag
Kjfinny
Fluorite | Level 6
the sheet name is also heart. thank you
ed_sas_member
Meteorite | Level 14

Hi @Kjfinny 

 

I also experienced these inconsistencies with the book.

-> The dataset 'Aprbills' can be accessed with the libname 'Cert' and not 'Clinic'

-> The dataset 'Heart' for scenario 6 can be accessed with the libname 'Sashelp' (no Excel file supplied):

data work.heart;
	set sashelp.heart (drop=AgeAtDeath DeathCause);
	where status="Alive";
	...
run;
	

Best,

Kjfinny
Fluorite | Level 6
scenario 6 need to use import data from an outside source.
but I will try~
Kurt_Bremser
Super User

Please post your logs in the future not as pictures, but by copy/pasting the log text into a window opened with the </> button:

Bildschirmfoto 2020-04-07 um 08.32.59.png

 

From the contents of your picture, I take it that you use University Edition in a virtual machine. To address files in the shared folder, you need to use the internal path of the VM, which is /folders/myfolders. The VM is a UNIX system, uses UNIX filename syntax, and does not have access to your local drives, only to the shared folder.

Kjfinny
Fluorite | Level 6
thank you and I will try.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 7 replies
  • 1739 views
  • 1 like
  • 4 in conversation