0

I am new to sas. I downloaded and installed the university version from here: http://www.sas.com/en_us/software/university-edition.html Now, I am learning it with the book "learning sas by examples". https://www.sas.com/storefront/aux/en/splearnexample/60864_excerpt.pdf The code is very simple:

data veg;
    infile "D:\sas\veggies.txt";
    input Name $ Code $ Days Number Price;
    CostPerSeed = Price/Number;
run;

The header of the file veggies file is as the following:

cucumber 50104-A 55 30 195
cucumber 51789-A 56 30 225
Carrot 50179-A 68 1500 395

I do not understand why. Could anyone help me with it please? Many many thanks.

EDIT: After constant trying, it seems like the shared folder works, but the code still does not work. The code is as the following:

data veg;
   infile "C:\mydownloadedsoftware\unvbasicvapp_9411005_vmx_en_sp0_1(1)\SAS-University-Edition\myfolders\smile.txt";
   input Name $ Code $ Days Number Price;

   CostPerSeed = Price/Number;

run;

The smile.txt is as the following:

Cucumber 50104-A  55 30 195
Cucumber 51789-A  56 30 225

Could anyone tell me why?

josephS
  • 29
  • 8
  • 1
    Please read the installation instructions step by step. You need to set up a shared drive and then move the file to the shared drive and reference there. – Reeza Sep 08 '15 at 22:24
  • @Reeza, many thanks for your reply. I am running it locally not in the server, so I still need to set up a shared drive? – josephS Sep 08 '15 at 22:33
  • Yes, because its running on a VM. – Reeza Sep 08 '15 at 22:37
  • 2
    http://stackoverflow.com/a/28428264/1919583 – Reeza Sep 08 '15 at 22:41
  • possible duplicate of [How can we import files from PC directly in SAS University Edition?](http://stackoverflow.com/questions/28426511/how-can-we-import-files-from-pc-directly-in-sas-university-edition) – Reeza Sep 09 '15 at 04:20
  • Thanks so much for your kind comments. It took me a long time and I was still confused though. Based on the link http://www.sas.com/en_us/software/university-edition.html, it seems like that I can put the myfolder folder wherever I want. But the link Reeza provided said that it needs to be put in the location where SAS university VM located. I tried both, but still it does not work. Could someone help me with it? Many many thanks. – josephS Sep 09 '15 at 15:06
  • What part doesnt work? Setting up shared folder? Accessing data. Explain step by step what you did and include a screenshot of your shared folder in SAS UE. – Reeza Sep 09 '15 at 15:12
  • I do not know which part. I followed exactly as the link sas.com/en_us/software/university-edition.html, it still gets physical file does not exist. I followed the other solution to put the folder in a specific location, and I still got the same physical file does not exist error. One question, how to know that the shared folder has been set up successflly – josephS Sep 09 '15 at 15:19
  • When you start up SAS UE it checks for updates (orange screen) then if shared folder isnt set up properly it shows an note to that effect. If you cant list step by step with screen shots I cant help beyond the original instructions already posted. – Reeza Sep 09 '15 at 15:21
  • Many thanks, Reeza. This just drive me crazy. You mean, when you type the address in your local explorer? When I enter the URL, I got the "A shared folder named "mayfolders" was not found on your virtual machine. See the FAQ for details." – josephS Sep 09 '15 at 15:42
  • On the left of the SAS studio, there are server files and folders pane, under which there are folder shortcuts and my folders two options. During my continuous trying, there are times where the file I intended to use for data analysis, say mydata.txt, appears under the folder shortcuts and there are also times where mydata.txt appears under the my folders option. Which one should it be ? – josephS Sep 09 '15 at 15:47
  • @Reeza, many thanks for your time and attention. Here is what I did. – josephS Sep 09 '15 at 15:50
  • (1): open the folder where the VMware virtual machine configuration exists, and create a folder with name myfolders. Put the file mydata.txt there. – josephS Sep 09 '15 at 16:11
  • (2): open the VMware, right click on the vapp and choose settings. – josephS Sep 09 '15 at 16:15
  • (3): Choose options, and choose shared folders, and enable it. Add the path to the myfolders created earlier. – josephS Sep 09 '15 at 16:16
  • (4): open the vmware and open the sas vapp. – josephS Sep 09 '15 at 16:17
  • You should modify the question, not post in the comments. When you open SAS UE does it say that the myfolders is created properly? Can you see it under myfolders? What code did you submit that doesn't work? – Reeza Sep 09 '15 at 16:19
  • Could someone help me please? Or do I need to download and restart from the very beginning ? – josephS Sep 09 '15 at 16:19
  • @Reeza, when I open the URL http://192.168.81.128, under the notifications, it told me " A shared folder named "myfolders" was not found on the virtual machine. See the FAQ for details". When I click the "Start SAS studio", in the sas studio, I can find medata.txt under folder shortcuts, not under my folders. – josephS Sep 09 '15 at 16:25
  • Try readding your shared folder. Restart the VM. The shared folder has to be exactly named myfolders all lower case and under the SAS UE folder. Otherwise contact sasanalyticsu@sas.com for tech support. – Reeza Sep 09 '15 at 16:29
  • @Reeza, the SAS UE folder is the same as the folder where the VMware virtual machine configuration exists, right? – josephS Sep 09 '15 at 16:36
  • I don't know what you mean. You should have a folder called SAS-UniversityEdition that you download. Put it in there. – Reeza Sep 09 '15 at 16:38
  • @Reeza, this totally drives me crazy. I just tried again. This time, it seems like the shared file works. But I still get the physical file does not exist error !!! – josephS Sep 09 '15 at 17:19
  • Your code is most likely wrong. Post it - in the question not comments. – Reeza Sep 09 '15 at 17:20
  • 1
    Your code is wrong. See Cynthia's answer here. https://communities.sas.com/message/218581#218581. – Reeza Sep 09 '15 at 18:04
  • infile "/folders/myfolders/smile.txt"; – Reeza Sep 09 '15 at 18:30
  • I'm going to assume it worked? – Reeza Sep 10 '15 at 14:37
  • Yes. it works. Sorry for being late reply. Thanks, Reeza. – josephS Sep 29 '15 at 17:04

0 Answers0