BookmarkSubscribeRSS Feed
Kurt_Bremser
Super User

Please run proc setinit and proc productstatus to verify that you have ACCESS to PC Files licensed and installed.

 

You can avoid all the hassle by simply saving the data to a csv file and importing it with a data step.

tianerhu
Pyrite | Level 9

i am student , that's my homework ;

i have the SAS license because i can get SAS for free from my college.

Kurt_Bremser
Super User

@tianerhu wrote:

i am student , that's my homework ;

i have the SAS license because i can get SAS for free from my college.


ARE YOU SURE? A definitive answer can only be given by running those procedures. We could go on for hundreds of posts before realizing that your installation is incomplete. Let's be prudent.

tianerhu
Pyrite | Level 9

what you mean is PC files server ?  yes , i have installed that .

 

 

now the code works , but in some conditions , but i feel somewhere is wrong , let me show you

 

first , i invert the sales.xls to SAS data set with import wizard and use the sasuser as the libref .

 

then ,  i write the code as following which does work

libname sasuser "C:\Users\Documents\Sales.xls";
proc print data = sasuser.sales;
   where EmpID = '9888' or EmpID = '0177';
run;

but what i want to say ——i have invert the sales.xls to SAS data set ,why i access it directly instead of sales.xls ?

tianerhu
Pyrite | Level 9

it's too late , i have to  sleep . thank you for your help. i have work on the issue for 7 hours  , i am almost crazy;

Kurt_Bremser
Super User
  1. It is a VERY BAD IDEA to use SASUSER as a library definition. SASUSER is a special library, automatically assigned at sesiion start, that SAS uses to store certain information. Do not re-assign it, and be thankful that it failed here.
  2. If you imported the file with the wizard to SASUSER, and the library assignment fails just like before, your SASUSER with the dataset in there is still assigned, and you can use the dataset in the procedure.
  3. If you import with the wizard, no other import step (like assigning a libname) is needed.
  4. Run the two proecdures as advised and show us the log.
tianerhu
Pyrite | Level 9

Thank you for your help , i will reply the next week, sorry about that, i have to prepare the midterm.

Reeza
Super User

I'm about 90% certain that did not work. There happens to be a dataset in the sasuser library titled SALES but it's not your dataset. The SASUSER library is a default library in SAS and ships with all SAS installations.

 

Ok, I"m wrong.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 23 replies
  • 1678 views
  • 2 likes
  • 5 in conversation