<?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: Problem With Bad Data in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Problem-With-Bad-Data/m-p/79246#M22835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The control character was probably a&amp;nbsp; (ctrl-Z).&amp;nbsp; Back in the days of DOS, and version 6 of PC SAS, that was still in use and has been maintained in SAS as an EOF character of for PC SAS since.&amp;nbsp; SAS will read most other control characters into a character variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 29 Sep 2012 18:55:59 GMT</pubDate>
    <dc:creator>Doc_Duke</dc:creator>
    <dc:date>2012-09-29T18:55:59Z</dc:date>
    <item>
      <title>Problem With Bad Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-With-Bad-Data/m-p/79241#M22830</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;Not sure whether to post in this forum, but it seems the best fit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am running the following code reading a not too large file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; data work01;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile "my\file\name.txt"&amp;nbsp;&amp;nbsp; lrecl=400 pad missover end=eof;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input @001 var01 $char400.;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a lot of "bad" data in the file - commas, special characters, etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that when a single quote appears in the data (as in the name: O'Leary) the read seems to stop&lt;/P&gt;&lt;P&gt;at that point and I get no more data.&amp;nbsp; This is only about half way through the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no indication in the log that any problem was encountered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how I can get past this?&amp;nbsp; I need to keep the data as it is (bad characters and all) for the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2012 15:49:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-With-Bad-Data/m-p/79241#M22830</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2012-09-27T15:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Bad Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-With-Bad-Data/m-p/79242#M22831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you need INFILE statement option IGNOREDOSEOF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2012 16:04:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-With-Bad-Data/m-p/79242#M22831</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-09-27T16:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Bad Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-With-Bad-Data/m-p/79243#M22832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct on the first try!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wonder why this option has anything to do with what I assume is quoted text?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2012 16:14:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-With-Bad-Data/m-p/79243#M22832</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2012-09-27T16:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Bad Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-With-Bad-Data/m-p/79244#M22833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not a quote just look like it.&amp;nbsp; Use LIST statement and if it is unprintable control character it will show the line in HEX and you can see what the character actually is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2012 16:32:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-With-Bad-Data/m-p/79244#M22833</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-09-27T16:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Bad Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-With-Bad-Data/m-p/79245#M22834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have often hit problems where someone has used a document editor like Microsoft Word to prepare data. Word will automatically change many characters, for instance the double quote " character to what it calls smartquotes, which have different open and close characters. SAS frequently coughs up a hairball when it sees these.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2012 17:18:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-With-Bad-Data/m-p/79245#M22834</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2012-09-28T17:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Bad Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-With-Bad-Data/m-p/79246#M22835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The control character was probably a&amp;nbsp; (ctrl-Z).&amp;nbsp; Back in the days of DOS, and version 6 of PC SAS, that was still in use and has been maintained in SAS as an EOF character of for PC SAS since.&amp;nbsp; SAS will read most other control characters into a character variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Sep 2012 18:55:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-With-Bad-Data/m-p/79246#M22835</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2012-09-29T18:55:59Z</dc:date>
    </item>
  </channel>
</rss>

