<?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: Removing variables in a table with a missing value, but only for certain observations in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/383469#M24718</link>
    <description>&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do know how to use macro language, but I don't know how to update a macro variable without erasing the previous list of variables to remove&amp;nbsp;from the first table. Ideally, I would want my "REMOVE_LIST" to include all variables to drop from all 3 tables separated by a " " without repeating them, because I then have to remove these variables from all my tables with a simple data step. Thank you for your time!&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2017 19:48:49 GMT</pubDate>
    <dc:creator>x2PSx</dc:creator>
    <dc:date>2017-07-27T19:48:49Z</dc:date>
    <item>
      <title>Removing variables in a table with a missing value, but only for certain observations</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/382631#M24710</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with 387 variables and 25 rows. I want to remove all variables that have missing values, but only if the missing values is between the 6th and the 25th rows (some variables have lags and so the first 5 rows may have missing values with no problem). I am guessing this is really easy with proc sql, but I can't figure out the code for it to work. For example, I want to remove "C_CNBA11M_LAG1" to "C_CNBA11M_LAG4" in this example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/14144iE9C3FB2B327D9627/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="example.jpg" title="example.jpg" /&gt;</description>
      <pubDate>Thu, 27 Jul 2017 17:27:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/382631#M24710</guid>
      <dc:creator>x2PSx</dc:creator>
      <dc:date>2017-07-27T17:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Removing variables in a table with a missing value, but only for certain observations</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/382741#M24712</link>
      <description>&lt;P&gt;If you want row level operations, a data step is a better approach. Especially if you need to identify rows. SQL does not necessarily honor order of the rows, especially if you don't have another variable that specifies the order of the rows.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 17:36:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/382741#M24712</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-27T17:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Removing variables in a table with a missing value, but only for certain observations</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/383389#M24713</link>
      <description>&lt;P&gt;Unfortunately, since you may or may not need to run a step to remove variables, this requires macro language.&amp;nbsp; Fortunately, if you know macro language it's only medium difficult.&amp;nbsp; For example (untested code):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro remove;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; proc summary data=have (firstobs=6);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var _numeric_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output out=missing_counts (drop=_type_ _freq_ ) nmiss=;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; proc transpose data=missing_counts out=transposed_counts;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var _numeric_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; %local remove_list;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; proc sql;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select distinct &amp;nbsp;_name_ &amp;nbsp;into : remove_list from transposed_counts where col1 &amp;gt; 0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; %if %length(&amp;amp;remove_list) %then %do;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have (drop=&amp;amp;remove_list);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; %end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; %else %put No variables had missing values from observation 6 onward.;&lt;/P&gt;
&lt;P&gt;%mend remove;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%remove&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 18:38:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/383389#M24713</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-07-27T18:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Removing variables in a table with a missing value, but only for certain observations</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/383458#M24716</link>
      <description>&lt;P&gt;Thank you, this worked for me:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;summary&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=HAVE(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;firstobs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;6&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;var&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; _numeric_;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;output&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=MISSING_COUNTS (&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;drop&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=_type__freq_)&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;nmiss&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;transpose&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=MISSING_COUNTS &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=TRANSPOSED_COUNTS;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;var&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; _numeric_;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;distinct&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; _name_ &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;into&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; : REMOVE_LIST separated by &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;" "&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; TRANSPOSED_COUNTS &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; col1 &amp;gt; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; _NAME_ &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"_FREQ_"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; WANT(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;drop&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&amp;amp;REMOVE_LIST);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; HAVE ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;However, I do have to do this for 3 tables, do you know of a way to each time "update" the macro variable REMOVE_LIST as to include variables with missing values for all 3 tables?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 19:33:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/383458#M24716</guid>
      <dc:creator>x2PSx</dc:creator>
      <dc:date>2017-07-27T19:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Removing variables in a table with a missing value, but only for certain observations</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/383460#M24717</link>
      <description>&lt;P&gt;This is a normal function of using macros.&amp;nbsp; The most common approach is to define the macro with parameters:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro remove (indata=, outdata=);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then anywhere you are referring to either the input data or output data, make a reference to the parameter.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data &amp;amp;outdata;&lt;/P&gt;
&lt;P&gt;set &amp;amp;indata;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Call the macro by supplying values for the parameters:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%remove (indata=have1, outdata=want1)&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 19:37:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/383460#M24717</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-07-27T19:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Removing variables in a table with a missing value, but only for certain observations</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/383469#M24718</link>
      <description>&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do know how to use macro language, but I don't know how to update a macro variable without erasing the previous list of variables to remove&amp;nbsp;from the first table. Ideally, I would want my "REMOVE_LIST" to include all variables to drop from all 3 tables separated by a " " without repeating them, because I then have to remove these variables from all my tables with a simple data step. Thank you for your time!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 19:48:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/383469#M24718</guid>
      <dc:creator>x2PSx</dc:creator>
      <dc:date>2017-07-27T19:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Removing variables in a table with a missing value, but only for certain observations</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/383473#M24719</link>
      <description>&lt;P&gt;If I understand correctly, you want to remove a variable from one of your data sets if contains missing values in another of the data sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For that, the simplest way is to save three versions of &amp;amp;REMOVE_LIST:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%global remove_list1 remove_list2 remove_list3;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then change the INTO destination, using one of those three variables instead of REMOVE_LIST.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, just put them all together:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(drop=&amp;amp;remove_list1 &amp;amp;remove_list2 &amp;amp;remove_list3)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There may be some duplication in the lists, but you don't need to remove the duplication for SAS to figure out what to drop.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 19:54:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/383473#M24719</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-07-27T19:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Removing variables in a table with a missing value, but only for certain observations</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/383497#M24721</link>
      <description>&lt;P&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif" size="3"&gt;Thank you for your help, I managed to write my code. Here it is for future reference or anybody that it could help&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; SCENARIOS = S0 S1 S2;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; REMOVE_LIST = REMOVE0 REMOVE1 REMOVE2;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%MACRO&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; REMOVE_VARS_W_MISSING_VALUES ( FIRST_ROW = ,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;TABLES_INPUT= ,&lt;/P&gt;&lt;P&gt;REMOVE_LIST=&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; i=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%to&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(countw(&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;TABLES_INPUT.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;)); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;proc summary data=&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;USERLIB.&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%scan&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;TABLES_INPUT.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;i.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;)(firstobs=&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;FIRST_ROW.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;var _NUMERIC_;&lt;/P&gt;&lt;P&gt;output out=MISSING_COUNTS (drop=_TYPE__FREQ_)nmiss=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc transpose data=MISSING_COUNTS out=TRANSPOSED_COUNTS;&lt;/P&gt;&lt;P&gt;var _NUMERIC_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;select distinct _NAME_ into : &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%scan&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;REMOVE_LIST.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;i.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) separated by &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;" "&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;from TRANSPOSED_COUNTS where col1 &amp;gt; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;and _NAME_ not = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"_FREQ_"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; i=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%to&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(countw(&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;TABLES_INPUT.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;)); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;data &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;USERLIB.&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%scan&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;TABLES_INPUT.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;i.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;)_MOD;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;set &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;USERLIB.&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%scan&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;TABLES_INPUT.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;i.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;)(drop=&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;REMOVE0.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;REMOVE1.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;REMOVE2.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%MEND&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;%&lt;STRONG&gt;&lt;I&gt;REMOVE_VARS_W_MISSING_VALUES&lt;/I&gt;&lt;/STRONG&gt; ( FIRST_ROW = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;6&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;TABLES_INPUT= &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;SCENARIOS.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;REMOVE_LIST= &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;REMOVE_LIST.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 20:47:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Removing-variables-in-a-table-with-a-missing-value-but-only-for/m-p/383497#M24721</guid>
      <dc:creator>x2PSx</dc:creator>
      <dc:date>2017-07-27T20:47:43Z</dc:date>
    </item>
  </channel>
</rss>

