<?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 WARNING: The variable xx1 in the DROP, KEEP, or RENAME list has never been referenced. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/WARNING-The-variable-xx1-in-the-DROP-KEEP-or-RENAME-list-has/m-p/712039#M80019</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had problems when running the following code. The log showed 'WARNING: The variable AGE in the DROP, KEEP, or RENAME list has never been referenced.'.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The dataset 'a1', '_age_v1' has already existed. I did not include the information of these datasets because they have nothing to do with the problem.&amp;nbsp; I simplified my coding as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_______________________________________________________________________&lt;/P&gt;&lt;P&gt;%let AGE = %str(attrib AGE length = 8 format = 3. label = "Age";);&lt;BR /&gt;%let AGEU = %str(attrib AGEU length = $25 format = $25. label = "Age Units";);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;amp;AGE &amp;amp;AGEU;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;set a1;&lt;BR /&gt;if (_n_ eq 1) then do;&lt;/P&gt;&lt;P&gt;declare hash b2(dataset: "_age_v1"); b2.defineKey("STUDYID" ); b2.defineData("age", "ageu"); b2.defineDone(); call missing(age, ageu);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data xx.test;&lt;BR /&gt;retain STUDYID SUBJID SITEID AGE AGEU;&lt;BR /&gt;set temp;&lt;BR /&gt;keep STUDYID SUBJID SITEID AGE AGEU;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;____________________END_____________________&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Suvan&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jan 2021 08:31:10 GMT</pubDate>
    <dc:creator>zhyl025</dc:creator>
    <dc:date>2021-01-18T08:31:10Z</dc:date>
    <item>
      <title>WARNING: The variable xx1 in the DROP, KEEP, or RENAME list has never been referenced.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/WARNING-The-variable-xx1-in-the-DROP-KEEP-or-RENAME-list-has/m-p/712039#M80019</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had problems when running the following code. The log showed 'WARNING: The variable AGE in the DROP, KEEP, or RENAME list has never been referenced.'.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The dataset 'a1', '_age_v1' has already existed. I did not include the information of these datasets because they have nothing to do with the problem.&amp;nbsp; I simplified my coding as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_______________________________________________________________________&lt;/P&gt;&lt;P&gt;%let AGE = %str(attrib AGE length = 8 format = 3. label = "Age";);&lt;BR /&gt;%let AGEU = %str(attrib AGEU length = $25 format = $25. label = "Age Units";);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;amp;AGE &amp;amp;AGEU;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;set a1;&lt;BR /&gt;if (_n_ eq 1) then do;&lt;/P&gt;&lt;P&gt;declare hash b2(dataset: "_age_v1"); b2.defineKey("STUDYID" ); b2.defineData("age", "ageu"); b2.defineDone(); call missing(age, ageu);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data xx.test;&lt;BR /&gt;retain STUDYID SUBJID SITEID AGE AGEU;&lt;BR /&gt;set temp;&lt;BR /&gt;keep STUDYID SUBJID SITEID AGE AGEU;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;____________________END_____________________&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Suvan&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2021 08:31:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/WARNING-The-variable-xx1-in-the-DROP-KEEP-or-RENAME-list-has/m-p/712039#M80019</guid>
      <dc:creator>zhyl025</dc:creator>
      <dc:date>2021-01-18T08:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: WARNING: The variable xx1 in the DROP, KEEP, or RENAME list has never been referenced.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/WARNING-The-variable-xx1-in-the-DROP-KEEP-or-RENAME-list-has/m-p/712044#M80020</link>
      <description>&lt;P&gt;I think the log is pretty self explanatory? The warning happens because you try to keep a variable that has not been referenced. Like below. The variable x is not in SASHELP.CLASS, so the Warning happens.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
   set sashelp.class;
   keep x;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More importantly.. What are you trying to do here? There are quite a lot of stuff in your code that makes little sense &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Like creating a hash object you do not use. I'll be happy to help you.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2021 09:01:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/WARNING-The-variable-xx1-in-the-DROP-KEEP-or-RENAME-list-has/m-p/712044#M80020</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-01-18T09:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: WARNING: The variable xx1 in the DROP, KEEP, or RENAME list has never been referenced.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/WARNING-The-variable-xx1-in-the-DROP-KEEP-or-RENAME-list-has/m-p/712062#M80021</link>
      <description>&lt;P&gt;1. Please show us the full log&lt;/P&gt;
&lt;P&gt;2. Please format your code and the log text by using the appropriate icons&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2021 10:16:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/WARNING-The-variable-xx1-in-the-DROP-KEEP-or-RENAME-list-has/m-p/712062#M80021</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-01-18T10:16:26Z</dc:date>
    </item>
  </channel>
</rss>

