<?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 Reading data from txt file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-txt-file/m-p/406002#M279212</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to read data from a text file. When I did that using the statement below I got notes saying 'invalid data for xyz variable'; I went back to the txt file and they had missing values. Is there any way I can tell SAS to ignore the observations w/ missing values or just get a summary of how many of those have missing values instead of getting notes for each case? The two variables I had missing values are: DTFSPNTC and DLNRMNBG&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data selected;&lt;BR /&gt;infile bb missover;&lt;BR /&gt;input @1 caseid 6.&lt;BR /&gt;@172 dob mmddyy8.&lt;BR /&gt;@414 age 2.&lt;BR /&gt;@1567 DTFSPNTC mmddyy8.&lt;BR /&gt;@1672 DLNRMNBG mmddyy8.&lt;BR /&gt;@1749 weight 4.&lt;BR /&gt;@1759 multiple 1.;&lt;/P&gt;&lt;P&gt;format dob date9.&lt;BR /&gt;DTFSPNTC date9.&lt;BR /&gt;DLNRMNBG date9.;&lt;BR /&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Oct 2017 15:39:14 GMT</pubDate>
    <dc:creator>Kiko</dc:creator>
    <dc:date>2017-10-20T15:39:14Z</dc:date>
    <item>
      <title>Reading data from txt file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-txt-file/m-p/406002#M279212</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to read data from a text file. When I did that using the statement below I got notes saying 'invalid data for xyz variable'; I went back to the txt file and they had missing values. Is there any way I can tell SAS to ignore the observations w/ missing values or just get a summary of how many of those have missing values instead of getting notes for each case? The two variables I had missing values are: DTFSPNTC and DLNRMNBG&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data selected;&lt;BR /&gt;infile bb missover;&lt;BR /&gt;input @1 caseid 6.&lt;BR /&gt;@172 dob mmddyy8.&lt;BR /&gt;@414 age 2.&lt;BR /&gt;@1567 DTFSPNTC mmddyy8.&lt;BR /&gt;@1672 DLNRMNBG mmddyy8.&lt;BR /&gt;@1749 weight 4.&lt;BR /&gt;@1759 multiple 1.;&lt;/P&gt;&lt;P&gt;format dob date9.&lt;BR /&gt;DTFSPNTC date9.&lt;BR /&gt;DLNRMNBG date9.;&lt;BR /&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 15:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-txt-file/m-p/406002#M279212</guid>
      <dc:creator>Kiko</dc:creator>
      <dc:date>2017-10-20T15:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from txt file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-txt-file/m-p/406019#M279213</link>
      <description>&lt;P&gt;You can use the ?? modifier to suppress the note on the invalid data, see sample below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  infile cards;
  input
    @1 someDate ?? mmddyy8.
    @10 someDate2 mmddyy8.
    @19 someChar $3.
  ;
  format someDate: date9.;
cards;
09112017 11092017 abc
         11102017 def
22112017 11112017 ghi
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Oct 2017 16:12:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-txt-file/m-p/406019#M279213</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-10-20T16:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from txt file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-txt-file/m-p/406020#M279214</link>
      <description>&lt;P&gt;SAS does not print a note when it encounters missing values in an input data set.&amp;nbsp; You must have something else going on like character strings where SAS is expecting numeric values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data x; input x; datalines;
.
;
proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;9    +data x; input x; datalines;
11   +;
NOTE: The data set WORK.X has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
      &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Oct 2017 16:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-txt-file/m-p/406020#M279214</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-10-20T16:13:10Z</dc:date>
    </item>
  </channel>
</rss>

