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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.