BookmarkSubscribeRSS Feed
Kastchei
Pyrite | Level 9
Is there a way of ignoring variable labels when using proc compare? I do not want a variable to show up as having differing attributes if the only thing that is different is the label. Thanks!
4 REPLIES 4
data_null__
Jade | Level 19
A "SAS Variable List" and the ATTRIB statement.

[pre]
data class1;
set sashelp.class;
label name = 'Name';
run;
proc compare base=sashelp.class compare=class1;
attrib _all_ label=' ';
run;
[/pre]
Kastchei
Pyrite | Level 9
That's awesome! Thanks.
data_null__
Jade | Level 19
If you wanted to do similar with formats/informats it is a little different you would need FORMAT and/or INFORMAT statements.

[pre]
data class1;
set sashelp.class;
label name = 'Name';
format _numeric_ 8.1;
run;
proc compare base=sashelp.class compare=class1;
attrib _all_ label=' ';
format _all_;
informat _all_;
run;
[/pre]
Kastchei
Pyrite | Level 9
Again, thank you! Good information.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 13228 views
  • 2 likes
  • 2 in conversation