BookmarkSubscribeRSS Feed
hdrew
Calcite | Level 5

I am using this SAS code for Variable Summary report and receiving an error message:  log is telling me the variable "auto" and "v1" doesn't exist

 

following SAS Code:


ods graphics on;
proc cluster method=average std pseudo noeigen outtree=tree;
id auto;
var v1-v4;
run;
proc tree horizontal;
run;

1 REPLY 1
Reeza
Super User

You do not have a DATA= option on the PROC statement which data set to use. By default it uses the last run data set, which is likely not what you want in this case since it doesn't have the variables. This is a style of programming I would never recommend, it's always better to explicitly specify the data set used in a procedure. 

 


@hdrew wrote:

I am using this SAS code for Variable Summary report and receiving an error message:  log is telling me the variable "auto" and "v1" doesn't exist

 

following SAS Code:


ods graphics on;
proc cluster data=inputDataSet method=average std pseudo noeigen outtree=tree;
id auto;
var v1-v4;
run;
proc tree data=tree horizontal;
run;


 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 695 views
  • 1 like
  • 2 in conversation