<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to drop a Variable in Proc Print in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-drop-a-Variable-in-Proc-Print/m-p/667368#M199828</link>
    <description>I tried it already and still I am getting the variable in Output Excel file.</description>
    <pubDate>Tue, 07 Jul 2020 07:23:42 GMT</pubDate>
    <dc:creator>Hari2</dc:creator>
    <dc:date>2020-07-07T07:23:42Z</dc:date>
    <item>
      <title>How to drop a Variable in Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-drop-a-Variable-in-Proc-Print/m-p/667365#M199826</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So,&lt;/P&gt;&lt;P&gt;- I kept the variable in Keep statement and I have sorted it.&lt;/P&gt;&lt;P&gt;- Now I am using ODS statement and then I used Proc Print as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods listing close;&lt;BR /&gt;ods excel file=" ./abc.xls " ;&lt;BR /&gt;title "Review &amp;amp;study ABC";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc print data=FINAL label noobs ;&lt;BR /&gt;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*/&lt;BR /&gt;run;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest how can I drop it (Height) from final Output file ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 07:09:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-drop-a-Variable-in-Proc-Print/m-p/667365#M199826</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2020-07-07T07:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop a Variable in Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-drop-a-Variable-in-Proc-Print/m-p/667367#M199827</link>
      <description>&lt;P&gt;add &lt;STRIKE&gt;it&lt;/STRIKE&gt;&amp;nbsp;the drop statement after specifying the dataset name&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=FINAL (drop=Height) label noobs;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 07:21:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-drop-a-Variable-in-Proc-Print/m-p/667367#M199827</guid>
      <dc:creator>sustagens</dc:creator>
      <dc:date>2020-07-07T07:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop a Variable in Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-drop-a-Variable-in-Proc-Print/m-p/667368#M199828</link>
      <description>I tried it already and still I am getting the variable in Output Excel file.</description>
      <pubDate>Tue, 07 Jul 2020 07:23:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-drop-a-Variable-in-Proc-Print/m-p/667368#M199828</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2020-07-07T07:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop a Variable in Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-drop-a-Variable-in-Proc-Print/m-p/667369#M199829</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/127753"&gt;@Hari2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I tried it already and still I am getting the variable in Output Excel file.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please post the full log.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 07:28:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-drop-a-Variable-in-Proc-Print/m-p/667369#M199829</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-07-07T07:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop a Variable in Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-drop-a-Variable-in-Proc-Print/m-p/667370#M199830</link>
      <description>Hi , I was checking final dataset and it was there in that. I realized it now that we are removing in final Excel file as we are dropping in Proc Print, so it's working and I dont see it in the Output Excel file.&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Tue, 07 Jul 2020 07:33:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-drop-a-Variable-in-Proc-Print/m-p/667370#M199830</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2020-07-07T07:33:14Z</dc:date>
    </item>
  </channel>
</rss>

