BookmarkSubscribeRSS Feed
pcorner13
Calcite | Level 5

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:

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 LIBNAME mn "/folders/myfolders/mn";
NOTE: Libref MN was successfully assigned as follows:
Engine: V9
Physical Name: /folders/myfolders/mn
74
75 *assign libref to ginny's january 2018 excel file;
76
77 LIBNAME ginny_j XLSX "/folders/myfolders/mn/ginny_jan2018.xlsx";
NOTE: Libref GINNY_J was successfully assigned as follows:
Engine: XLSX
Physical Name: /folders/myfolders/mn/ginny_jan2018.xlsx
78
79 *create data set dls.ginny_act_jan2018: contains january 2018 activities data;
80
81 DATA mn.ginny_act_jan2018;
82 SET ginny_j.activities;
ERROR: File GINNY_J.activities.DATA does not exist.
83 RUN;
 
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set MN.GINNY_ACT_JAN2018 may be incomplete. When this step was stopped there were 0 observations and 0 variables.
WARNING: Data set MN.GINNY_ACT_JAN2018 was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.00 seconds

I appreciate your help!

 

2 REPLIES 2
koyelghosh
Lapis Lazuli | Level 10

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

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 712 views
  • 0 likes
  • 3 in conversation