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;


 

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand in the Innovate Hub.

Watch 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
  • 1221 views
  • 1 like
  • 2 in conversation