<?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 delete a row if some of the variables are empty. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89737#M19046</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Not Sure if&amp;nbsp; this is the right way.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Because In my datasets non-header variables are not contiguous, and the count&amp;nbsp; of non header variables are vary from one dataset to another.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;So for each dataset i have to count non header variables and have to put that number in the condition.It may create additional work...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Sanjeev.K&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Aug 2012 14:41:18 GMT</pubDate>
    <dc:creator>kuridisanjeev</dc:creator>
    <dc:date>2012-08-10T14:41:18Z</dc:date>
    <item>
      <title>How to delete a row if some of the variables are empty.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89731#M19040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having around 30 datasets and every data set containing more then 20 variables. In 20 variables,6 variables are header variables(I.e Every dataset having this variables) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to delete the row if&amp;nbsp; all the variables(other then header variables) contains null values in each dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could any one&amp;nbsp; please help on this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sanjeev.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 11:06:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89731#M19040</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2012-08-10T11:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a row if some of the variables are empty.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89732#M19041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ... if all the non-header variables are contiguous, this works (consider ID and AGE as two header variables) ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;data x;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;input id age a b c (d e f) (:$1.);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;12 10 . . . . . .&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;13&amp;nbsp; . 1 2 3 q w e&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;14 24 . . . c v b&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;15 30 1 2 3 . . .&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;.&amp;nbsp;&amp;nbsp; . 6 7 8 o o o&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;.&amp;nbsp;&amp;nbsp; . . . . . . .&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;options missing=' ';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;data y;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;set x;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;if ^missing(catt(of a--f));&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;options missing='.';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;id&amp;nbsp;&amp;nbsp;&amp;nbsp; age&amp;nbsp;&amp;nbsp;&amp;nbsp; a&amp;nbsp;&amp;nbsp;&amp;nbsp; b&amp;nbsp;&amp;nbsp;&amp;nbsp; c&amp;nbsp;&amp;nbsp;&amp;nbsp; d&amp;nbsp;&amp;nbsp;&amp;nbsp; e&amp;nbsp;&amp;nbsp;&amp;nbsp; f&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp; q&amp;nbsp;&amp;nbsp;&amp;nbsp; w&amp;nbsp;&amp;nbsp;&amp;nbsp; e&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; c&amp;nbsp;&amp;nbsp;&amp;nbsp; v&amp;nbsp;&amp;nbsp;&amp;nbsp; b&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp; o&amp;nbsp;&amp;nbsp;&amp;nbsp; o&amp;nbsp;&amp;nbsp;&amp;nbsp; o&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the non-header variables are not contiguous, you just have to modify the arguments to the CATT function to include all the non-header variables&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 12:09:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89732#M19041</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-08-10T12:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a row if some of the variables are empty.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89733#M19042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My non-header variables containing both numeric and char variables..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this logic works on&amp;nbsp; my datasets???&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sanjeev.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 12:27:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89733#M19042</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2012-08-10T12:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a row if some of the variables are empty.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89734#M19043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi .. in my example, the non-header variables are a mix of numeric (A B C)&amp;nbsp; and character (D E F).&amp;nbsp; Yes, it works with that combination.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 12:40:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89734#M19043</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-08-10T12:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a row if some of the variables are empty.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89735#M19044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;another way:&lt;/P&gt;&lt;P&gt;data x;&lt;BR /&gt;input id age a b c (d e f) (:$1.);&lt;BR /&gt;datalines;&lt;BR /&gt;12 10 . . . . . .&lt;BR /&gt;13&amp;nbsp; . 1 2 3 q w e&lt;BR /&gt;14 24 . . . c v b&lt;BR /&gt;15 30 1 2 3 . . .&lt;BR /&gt;.&amp;nbsp;&amp;nbsp; . 6 7 8 o o o&lt;BR /&gt;.&amp;nbsp;&amp;nbsp; . . . . . . .&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;data y;&lt;BR /&gt; set x;&lt;BR /&gt; if cmiss(of a--f)&amp;lt;6;&lt;BR /&gt; proc print;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 13:29:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89735#M19044</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-08-10T13:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a row if some of the variables are empty.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89736#M19045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You have got great suggestions on single data set, while it would still be a chore to do 30 data set if they have different variable structures. Macro has been introduced below to help you on generalization of your problem.&lt;/P&gt;&lt;P&gt;1. Suppose your head variables are known, and in this example they are 'id' and 'age'.&lt;/P&gt;&lt;P&gt;2. You will output your cleaned data set to another library, in this case 'out'&lt;/P&gt;&lt;P&gt;3. Your original data sets are located in library 'work'.&lt;/P&gt;&lt;P&gt;4. The number of your header variable is 2 , in this case. So do replace it with 6, which is supposed to be your real case?.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname out 'c:\temp\';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;select distinct cats(memname) into :dname separated by ' ' from dictionary.columns where libname='WORK';&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro del_row;&lt;/P&gt;&lt;P&gt;%do i=1 %to %sysfunc(countw(&amp;amp;dname));&lt;/P&gt;&lt;P&gt;&amp;nbsp; %let _dname=%scan(&amp;amp;dname,&amp;amp;i);&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; select CATS(max(varnum)) into :max from dictionary.columns where libname='WORK' AND MEMNAME="&amp;amp;_DNAME";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; SELECT DISTINCT CATS(NAME) INTO :VNAME SEPARATED BY ',' FROM DICTIONARY.COLUMNS&amp;nbsp;&amp;nbsp; where libname='WORK' AND MEMNAME="&amp;amp;_DNAME";&lt;/P&gt;&lt;P&gt;&amp;nbsp; QUIT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; data out.&amp;amp;_dname._new;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set &amp;amp;_dname;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if cmiss(&amp;amp;vname)-cmiss(id,age)&amp;lt;&amp;amp;max-2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %mend;&lt;/P&gt;&lt;P&gt;%del_row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 14:36:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89736#M19045</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-08-10T14:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a row if some of the variables are empty.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89737#M19046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Not Sure if&amp;nbsp; this is the right way.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Because In my datasets non-header variables are not contiguous, and the count&amp;nbsp; of non header variables are vary from one dataset to another.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;So for each dataset i have to count non header variables and have to put that number in the condition.It may create additional work...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Sanjeev.K&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 14:41:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89737#M19046</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2012-08-10T14:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a row if some of the variables are empty.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89738#M19047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please check out my generalized approach. It does not have the restriction on variable position.&lt;/P&gt;&lt;P&gt;All you need to do:&lt;/P&gt;&lt;P&gt;1. know your common head variable names.&lt;/P&gt;&lt;P&gt;2. put all and only your old data sets under a certain library.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 14:48:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89738#M19047</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-08-10T14:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a row if some of the variables are empty.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89739#M19048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try the modified code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data x;&lt;BR /&gt;input id age a b c (d e f) (:$1.);&lt;BR /&gt;datalines;&lt;BR /&gt;12 10 . . . . . .&lt;BR /&gt;13&amp;nbsp; . 1 2 3 q w e&lt;BR /&gt;14 24 . . . c v b&lt;BR /&gt;15 30 1 2 3 . . .&lt;BR /&gt;.&amp;nbsp;&amp;nbsp; . 6 7 8 o o o&lt;BR /&gt;.&amp;nbsp;&amp;nbsp; . . . . . . .&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;%let dsn=x; /* your dataset */&lt;BR /&gt;%let header=id age; /* your header variables */&lt;BR /&gt;proc sql noprint;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; select CATS(max(varnum)) into :max from dictionary.columns where libname='WORK' AND MEMNAME="%upcase(&amp;amp;dsn)";&lt;BR /&gt;&amp;nbsp;&amp;nbsp; select CATS(NAME) INTO :VNAME SEPARATED BY ' ' FROM DICTIONARY.COLUMNS&amp;nbsp;&amp;nbsp; where libname='WORK' AND MEMNAME="%upcase(&amp;amp;dsn)";&lt;BR /&gt;quit;&lt;BR /&gt;data new_&amp;amp;dsn.;&lt;BR /&gt;&amp;nbsp; set &amp;amp;dsn;&lt;BR /&gt;&amp;nbsp; if cmiss(of &amp;amp;vname)-cmiss(of &amp;amp;header)&amp;lt;&amp;amp;max-%sysfunc(countw(&amp;amp;header));&lt;BR /&gt; run;&lt;BR /&gt; proc print;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 17:42:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-row-if-some-of-the-variables-are-empty/m-p/89739#M19048</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-08-10T17:42:31Z</dc:date>
    </item>
  </channel>
</rss>

