04-22-2016 12:06 PM
I need help in writing the initial code to access data in my folder. Everything I've tried hasn't worked. I've tried proc import, infile, reffile, and libname but the results doesn't show any data. When I click on the file in myfolders section all of the data appears. I know it has something to do with how I'm coding. Help!
04-22-2016 12:36 PM
What are you trying to do?
To just display the data,
libname x '[path to the file]';
select * from x.data;
04-22-2016 12:49 PM
Thanks for your response. I have a whole list of things I'm trying to do but I can't seem to get started. First, I need to create a box plot of the mean birthweight, ttest, and other descriptive statistics to get started. Also, odds ratio and regression analysis. I'm very new to SAS. This is what I wrote:
libname epidata '/folders/myshortcuts/myfolders-2/DataProject2016.sas7bdat';
This is the error I obtained:
Library epidata does not exist.
(but it's there in the library)
04-22-2016 12:54 PM
Think of the libname as the folder, not the whole pathname to the file. So try this
libname epidata '/folders/myshortcuts/myfolders-2';
04-22-2016 01:32 PM
libname epi 'c:/folders/myshortcuts/myfolders-2';
select * from epi.dataProject2016;
Notice that I've truncated the library name to "epi."
04-22-2016 05:37 PM
04-22-2016 08:48 PM
Did you place the files in the myfolders that you created? It should be named exactly myfolders, in lowercase and no 2.
Did you set up the shared drive on your VM?
Or did you map a different directory and set that up as a shared drive?
You may want to try the SAS Pprogram in 1 e-course which is free online.
04-22-2016 03:24 PM
Are you using the SAS University Edition? If so the virtual machine that SAS runs in only sees the files set up for the virtual machine starting at /folders/myfolders AND uses LINUX/UNIX file syntax which is case sensitive and uses / instead of \.
If you are using SAS University Edition there are many posts on this forum about this issue.