BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MeghnaRoy9
Obsidian | Level 7

Hey! New SAS user here! I would like to know where I'm going wrong with the following code.

 

So, I ran the code given below and the result was saved in My Libraries:

LIBNAME CLS "/folders/myshortcuts/study1";
RUN;

Post this, when I'm trying to run the given code, a message prompts stating -

 
ERROR: File WORK.CLUSTER_DATA.DATA does not exist.

 

ODS HTML FILE = "/folders/myshortcuts/study1/CLUSTER_DATA.XLS";
PROC MEANS DATA = CLUSTER_DATA Nmiss;
RUN;
ODS HTML CLOSE;

Please help me understand where I'm wrong and what should be done.
The data has been attached below. 
Thank You! 

1 ACCEPTED SOLUTION

Accepted Solutions
andreas_lds
Jade | Level 19

You haven't specified the libref in proc means, so sas tries to find cluster_data in work. Using cls.cluster_date in proc means should solve the problem.

 

Two things to note: you don't need run after libname and you should not write code in upcase letters, using lower case letters increases readability.

View solution in original post

4 REPLIES 4
Shmuel
Garnet | Level 18

You are probably using SAS University Edition.

The path "/folders/myshortcuts/..." was changed in last version to "/folders/myfolders/... ".

MeghnaRoy9
Obsidian | Level 7

Thank you for the reply.

when I tried to use the path with "my folders" it says that the library does not exist. the path works when I use "my shortcuts".

the problem arises when I try to export my data as an excel file. 

andreas_lds
Jade | Level 19

You haven't specified the libref in proc means, so sas tries to find cluster_data in work. Using cls.cluster_date in proc means should solve the problem.

 

Two things to note: you don't need run after libname and you should not write code in upcase letters, using lower case letters increases readability.

MeghnaRoy9
Obsidian | Level 7
Thank you so much! it works now 🙂
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
  • 4 replies
  • 1241 views
  • 1 like
  • 3 in conversation