I have a file that was provided by an instructor, along with all the excel files. (SAS University Edition) When I run the program on my system, I receive the error that the file does not exist. I can open it in excel. I thought perhaps the file was corrupted so reloaded everything, but still the same error. I didn't want to hold the class up as the same program worked for everyone else, so I'm thinking there must be a "permission" issue somewhere? This is only my first day working with SAS, so any help would be appreciated. Here is the code that we were given:
LIBNAME mn "/folders/myfolders/mn";
*assign libref to ginny's january 2018 excel file;
LIBNAME ginny_j XLSX "/folders/myfolders/mn/ginny_jan2018.xlsx";
*create data set dls.ginny_act_jan2018: contains january 2018 activities data;
DATA mn.ginny_act_jan2018;
SET ginny_j.activities;
RUN;
LIBNAME ginny_j CLEAR;
Output:
I appreciate your help!
Inspect the Excel workbook to see which sheets are present.
Can you see that ginny_j (in your libraries) have files? You should have 1 file for every sheet contained in the xlsx file ginny_jan2018.xlsx. May be the sheet name is different.
Alternatively try to run one of the following.
PROC CONTENTS ginny_j._ALL_ nods;
RUN;
Or
PROC DATASETS lib=ginny_j;
QUIT;
And paste the output. The above code should output all the files available in ginny_j
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.