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 🙂

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register 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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 464 views
  • 1 like
  • 3 in conversation