- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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 ?
- Tags:
- Cynthia
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Hari2 wrote:
I tried it already and still I am getting the variable in Output Excel file.
Please post the full log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
add it the drop statement after specifying the dataset name
proc print data=FINAL (drop=Height) label noobs;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Hari2 wrote:
I tried it already and still I am getting the variable in Output Excel file.
Please post the full log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply. 🙂