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 -
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!
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.
You are probably using SAS University Edition.
The path "/folders/myshortcuts/..." was changed in last version to "/folders/myfolders/... ".
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.
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.