Hi All,
I have list of variables in final data set and I don't want to display one variable. But I am using that variable in Sorting, so I can not drop that variable. Lets assume that variable name as 'Height'.
So,
- I kept the variable in Keep statement and I have sorted it.
- Now I am using ODS statement and then I used Proc Print as below.
ods listing close;
ods excel file=" ./abc.xls " ;
title "Review &study ABC";
run;
proc print data=FINAL label noobs ;
var XX YY ZZ ; /*Though I am not keeping the variable ('Height') in VAR statement, I am still getting that variable in final output Excel file*/
run;
Please suggest how can I drop it (Height) from final Output file ?
@Hari2 wrote:
I tried it already and still I am getting the variable in Output Excel file.
Please post the full log.
add it the drop statement after specifying the dataset name
proc print data=FINAL (drop=Height) label noobs;
@Hari2 wrote:
I tried it already and still I am getting the variable in Output Excel file.
Please post the full log.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.