Desktop productivity for business analysts and programmers

sas studio not reading file in desktop

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

sas studio not reading file in desktop

Hi

I am trying to read a file stored in my desktop.

i created the libname zo 'c:\users\desktop';

proc print data=zo.saspractice;

run;

 

the system says library zo.saspractice does not exist

 

 


Accepted Solutions
Solution
‎12-30-2016 04:29 PM
Grand Advisor
Posts: 10,210

Re: sas studio not reading file in desktop

Most SAS procedures use files in proprietary SAS file formats. If you data is in a text, csv, xls, xlsx or other file format then the data has to be imported into SAS so the values are in the right file format. Until you have done that using either a wizard, task or code written to read the data there is not a SAS formatted data set and so the "the data set does not exist".

 

The name SASPRACTICE makes me think you have been given some training materials. You may need to read the introduction or instructions on how to import the files so that they are available for use in SAS.

View solution in original post


All Replies
Grand Advisor
Posts: 10,210

Re: sas studio not reading file in desktop

How did you place the data set SASPRACTICE into the folder c:\users\desktop?

Occasional Contributor
Posts: 6

Re: sas studio not reading file in desktop

i placed the saspractice file inside the Myfolder folder

Grand Advisor
Posts: 17,325

Re: sas studio not reading file in desktop

If your using SAS UE make sure to place the file in the myfolders folder you created during set up. 

Then refer to it using the Unix notation. 

 

/folded/myfolders/file_name.csv

 

 

If you continue to get errors please post the code and log. 

Occasional Contributor
Posts: 6

Re: sas studio not reading file in desktop

Hi Reeza

 

it still doesnt work.. i changed the file format to csv from the xlsx originally.

also,  i put the name of the file at the end of the path...still the error message says error: file FOL.PR.data does not exist

 

thanks

ap

Grand Advisor
Posts: 17,325

Re: sas studio not reading file in desktop


ajith wrote:

Hi Reeza

 

it still doesnt work.. i changed the file format to csv from the xlsx originally.

also,  i put the name of the file at the end of the path...still the error message says error: file FOL.PR.data does not exist

 

thanks

ap


If you continue to get errors post the code and log. 

Solution
‎12-30-2016 04:29 PM
Grand Advisor
Posts: 10,210

Re: sas studio not reading file in desktop

Most SAS procedures use files in proprietary SAS file formats. If you data is in a text, csv, xls, xlsx or other file format then the data has to be imported into SAS so the values are in the right file format. Until you have done that using either a wizard, task or code written to read the data there is not a SAS formatted data set and so the "the data set does not exist".

 

The name SASPRACTICE makes me think you have been given some training materials. You may need to read the introduction or instructions on how to import the files so that they are available for use in SAS.

Occasional Contributor
Posts: 6

Re: sas studio not reading file in desktop

agree. this is the problem. i stored it as an xlsx and csv file. i will change it to a sas data set. hopefully that will solve the problem

Grand Advisor
Posts: 10,210

Re: sas studio not reading file in desktop

Do you do a file save as or just change the extension? If that is what you did then change the extension back to sas7bdat.

If it is a program file then there's likely more work to go

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 281 views
  • 0 likes
  • 3 in conversation