<?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 How to remove inconsistent data rows? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-inconsistent-data-rows/m-p/249781#M47027</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi SAS users,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to combine dozens of csv files usng a wildcard code (INFILE, INFORMAT, INPUT). Although I don't get any error for my code, I get a warning that makes me concerend. Looking at the log and my csv files, it seems that (at least part of the issue) is due to inconsistant data type in some rows (see the screenshot below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, my question is how to ask SAS to delete/remove those rows&amp;nbsp;(having inconsistant data type) while running the program?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1875i21EB0488B75DCEF2/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="1.jpg" title="1.jpg" /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Feb 2016 18:31:47 GMT</pubDate>
    <dc:creator>almmotamedi</dc:creator>
    <dc:date>2016-02-12T18:31:47Z</dc:date>
    <item>
      <title>How to remove inconsistent data rows?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-inconsistent-data-rows/m-p/249781#M47027</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi SAS users,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to combine dozens of csv files usng a wildcard code (INFILE, INFORMAT, INPUT). Although I don't get any error for my code, I get a warning that makes me concerend. Looking at the log and my csv files, it seems that (at least part of the issue) is due to inconsistant data type in some rows (see the screenshot below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, my question is how to ask SAS to delete/remove those rows&amp;nbsp;(having inconsistant data type) while running the program?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1875i21EB0488B75DCEF2/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="1.jpg" title="1.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 18:31:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-inconsistent-data-rows/m-p/249781#M47027</guid>
      <dc:creator>almmotamedi</dc:creator>
      <dc:date>2016-02-12T18:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove inconsistent data rows?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-inconsistent-data-rows/m-p/249795#M47030</link>
      <description>&lt;P&gt;I am sure there is a cleaner way to do this but I would import all of the fileds as characters, then remove the ones you don't want then convert the variables to be the correct formats.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it might take a few steps but this way you have more control over what you are getting.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 19:16:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-inconsistent-data-rows/m-p/249795#M47030</guid>
      <dc:creator>RyanMcGovern</dc:creator>
      <dc:date>2016-02-12T19:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove inconsistent data rows?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-inconsistent-data-rows/m-p/249801#M47033</link>
      <description>Is this an adhoc operation or a regular/production like operation? &lt;BR /&gt;If the later, establish a file specification with your data supplier that states data types, lengths,  names, valid values etc. When data fail to follow this spec, report back and demand a file that is corrected.</description>
      <pubDate>Fri, 12 Feb 2016 19:28:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-inconsistent-data-rows/m-p/249801#M47033</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-02-12T19:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove inconsistent data rows?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-inconsistent-data-rows/m-p/249803#M47034</link>
      <description>&lt;P&gt;If this is truly affectin many variables the easiest might be using the CMISS function. Cmiss will tell you how many of the variables have missing values. So if the number is "large" you could delete them from a file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; if cmiss(var1, var2, var3 , ...,varn) &amp;lt; (some critical number);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have lots of rows like this it may be worth going back to your raw csv files using a TEXT program to see if you have rows at the ends of files that are all commas. This is a common occurence when converting spreadsheets to CSV. Some forms of use will "touch" rows or columns so that they get included in CSV files when there is no data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something else to look for are inserted "page breaks" such a row between blocks of data.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 19:40:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-inconsistent-data-rows/m-p/249803#M47034</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-02-12T19:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove inconsistent data rows?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-inconsistent-data-rows/m-p/250011#M47107</link>
      <description>&lt;P&gt;use operator ?? to set them all missing .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;input a : ?? ddmmyy10. b : ?? best32. c : ?? $20. ............&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 02:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-inconsistent-data-rows/m-p/250011#M47107</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-02-15T02:58:21Z</dc:date>
    </item>
  </channel>
</rss>

