<?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 What do these invalid data error notes mean? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/What-do-these-invalid-data-error-notes-mean/m-p/626366#M184735</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;I'm importing this data and there's supposed to be 1 error in there, but I'm getting 2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data CarVROOM;
infile "E:\...VROOM.txt" firstobs=9 missover;
input Manufacturer$ Model$ Type$ Min_Price Price Max_Price MPG_city MPG_highway DriveTrain$ Cylinders;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is the log report:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: Invalid data for Cylinders in line 70 45-50.
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9--
70        Mazda RX-7 Sporty 32.5 32.5 32.5 17 25 Rear rotary 50
Manufacturer=Mazda Model=RX-7 Type=Sporty Min_Price=32.5 Price=32.5 Max_Price=32.5 MPG_city=17
MPG_highway=25 DriveTrain=Rear Cylinders=. _ERROR_=1 _N_=57
NOTE: Invalid data for MPG_highway in line 93 36-38.
93        Subaru Justy Small 7.3 8.4 9.5 33  4WD 3 40
Manufacturer=Subaru Model=Justy Type=Small Min_Price=7.3 Price=8.4 Max_Price=9.5 MPG_city=33
MPG_highway=. DriveTrain=3 Cylinders=. _ERROR_=1 _N_=80&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks like the errors are to do with the values being "." instead of numbers in the dataset, are there any options to add to the infile statement to reduce one of these errors?&lt;/P&gt;</description>
    <pubDate>Thu, 20 Feb 2020 22:18:38 GMT</pubDate>
    <dc:creator>whoisyourmother</dc:creator>
    <dc:date>2020-02-20T22:18:38Z</dc:date>
    <item>
      <title>What do these invalid data error notes mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-do-these-invalid-data-error-notes-mean/m-p/626366#M184735</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;I'm importing this data and there's supposed to be 1 error in there, but I'm getting 2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data CarVROOM;
infile "E:\...VROOM.txt" firstobs=9 missover;
input Manufacturer$ Model$ Type$ Min_Price Price Max_Price MPG_city MPG_highway DriveTrain$ Cylinders;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is the log report:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: Invalid data for Cylinders in line 70 45-50.
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9--
70        Mazda RX-7 Sporty 32.5 32.5 32.5 17 25 Rear rotary 50
Manufacturer=Mazda Model=RX-7 Type=Sporty Min_Price=32.5 Price=32.5 Max_Price=32.5 MPG_city=17
MPG_highway=25 DriveTrain=Rear Cylinders=. _ERROR_=1 _N_=57
NOTE: Invalid data for MPG_highway in line 93 36-38.
93        Subaru Justy Small 7.3 8.4 9.5 33  4WD 3 40
Manufacturer=Subaru Model=Justy Type=Small Min_Price=7.3 Price=8.4 Max_Price=9.5 MPG_city=33
MPG_highway=. DriveTrain=3 Cylinders=. _ERROR_=1 _N_=80&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks like the errors are to do with the values being "." instead of numbers in the dataset, are there any options to add to the infile statement to reduce one of these errors?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 22:18:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-do-these-invalid-data-error-notes-mean/m-p/626366#M184735</guid>
      <dc:creator>whoisyourmother</dc:creator>
      <dc:date>2020-02-20T22:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: What do these invalid data error notes mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-do-these-invalid-data-error-notes-mean/m-p/626367#M184736</link>
      <description>&lt;P&gt;Is Cylinders Numeric or Character? It looks like you have it as a Character in 1 spot ("2WD" /"4WD" I'd assume you want it to be Character) but then reference it missing as if it is numeric:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Cylinders=.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe try changing the missing data to " " (Blanks)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: I'm a noob with SAS sorry try changing your input statement for Cylinders and declare it as a Character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data CarVROOM;
infile "E:\...VROOM.txt" firstobs=9 missover;
input Manufacturer$ Model$ Type$ Min_Price Price Max_Price MPG_city MPG_highway DriveTrain$ Cylinders$.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Feb 2020 22:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-do-these-invalid-data-error-notes-mean/m-p/626367#M184736</guid>
      <dc:creator>Krueger</dc:creator>
      <dc:date>2020-02-20T22:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: What do these invalid data error notes mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-do-these-invalid-data-error-notes-mean/m-p/626368#M184737</link>
      <description>&lt;P&gt;Thanks again!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 22:32:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-do-these-invalid-data-error-notes-mean/m-p/626368#M184737</guid>
      <dc:creator>whoisyourmother</dc:creator>
      <dc:date>2020-02-20T22:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: What do these invalid data error notes mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-do-these-invalid-data-error-notes-mean/m-p/626369#M184738</link>
      <description>&lt;P&gt;It means your data is not being read in correctly. Specifically,&lt;FONT size="4" color="#FF0000"&gt; cylinders&lt;/FONT&gt;. In this case it looks like the Drivertrain is actually two things: &lt;FONT size="4" color="#FF6600"&gt;&lt;STRONG&gt;Rear rotary&lt;/STRONG&gt;&lt;/FONT&gt;, which contains a space which throws off your alignment of the data. So it tries to read rotary into the cylinders field which is incorrect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;NOTE: Invalid data for &lt;FONT size="4" color="#FF0000"&gt;&lt;STRONG&gt;Cylinders&lt;/STRONG&gt;&lt;/FONT&gt; in line 70 45-50.
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9--
70        Mazda RX-7 Sporty 32.5 32.5 32.5 17 25 &lt;FONT size="4" color="#FF6600"&gt;&lt;STRONG&gt;Rear rotary&lt;/STRONG&gt;&lt;/FONT&gt; 50
Manufacturer=Mazda Model=RX-7 Type=Sporty Min_Price=32.5 Price=32.5 Max_Price=32.5 MPG_city=17
MPG_highway=25 DriveTrain=Rear Cylinders=. _ERROR_=1 _N_=57&lt;/PRE&gt;
&lt;P&gt;You have a similar issue with other variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/313118"&gt;@whoisyourmother&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;I'm importing this data and there's supposed to be 1 error in there, but I'm getting 2.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data CarVROOM;
infile "E:\...VROOM.txt" firstobs=9 missover;
input Manufacturer$ Model$ Type$ Min_Price Price Max_Price MPG_city MPG_highway DriveTrain$ Cylinders;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is the log report:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: Invalid data for Cylinders in line 70 45-50.
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9--
70        Mazda RX-7 Sporty 32.5 32.5 32.5 17 25 Rear rotary 50
Manufacturer=Mazda Model=RX-7 Type=Sporty Min_Price=32.5 Price=32.5 Max_Price=32.5 MPG_city=17
MPG_highway=25 DriveTrain=Rear Cylinders=. _ERROR_=1 _N_=57
NOTE: Invalid data for MPG_highway in line 93 36-38.
93        Subaru Justy Small 7.3 8.4 9.5 33  4WD 3 40
Manufacturer=Subaru Model=Justy Type=Small Min_Price=7.3 Price=8.4 Max_Price=9.5 MPG_city=33
MPG_highway=. DriveTrain=3 Cylinders=. _ERROR_=1 _N_=80&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like the errors are to do with the values being "." instead of numbers in the dataset, are there any options to add to the infile statement to reduce one of these errors?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 22:33:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-do-these-invalid-data-error-notes-mean/m-p/626369#M184738</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-02-20T22:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: What do these invalid data error notes mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-do-these-invalid-data-error-notes-mean/m-p/626371#M184740</link>
      <description>&lt;P&gt;Show more of your data.&amp;nbsp; It does not look like it is formatted in a way that you can parse it.&lt;/P&gt;
&lt;P&gt;Here are the two lines you included in your message.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;----+----1----+----2----+----3----+----4----+----5----+----6
Mazda RX-7 Sporty 32.5 32.5 32.5 17 25 Rear rotary
Subaru Justy Small 7.3 8.4 9.5 33  4WD 3
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You are trying to read the data using LIST MODE input.&amp;nbsp; So each value is separated by one or more spaces. That first line has 10 values and the second line only has 9 values.&amp;nbsp; Your INPUT statement is trying to read 10 variables. 3 character, 5 numbers, 1 character and 1 number.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looks like you have two issues.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first line is having trouble because the value of&amp;nbsp; DRIVE_TRAIN has an embedded space.&amp;nbsp; You need to either use something else as the delimiter instead of space, or add an extra space after the values of DRIVE_TRAIN and use the &amp;amp; modifier on the input to have it keep reading until it sees two or more spaces to mark the end of the string.&amp;nbsp; (You might need to do that for your other character variables also)&amp;gt;&lt;/P&gt;
&lt;P&gt;The second appears to be missing a value for one of the 5 numeric values in the middle.&amp;nbsp; Your text file should have a period to mark where a missing value belongs.&amp;nbsp; It is not clear which value is missing.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Mazda RX-7 Sporty 32.5 32.5 32.5 17 25 Rear rotary  .
Subaru Justy Small 7.3 8.4 9.5 33 . 4WD  3&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 22:49:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-do-these-invalid-data-error-notes-mean/m-p/626371#M184740</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-02-20T22:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: What do these invalid data error notes mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-do-these-invalid-data-error-notes-mean/m-p/626377#M184743</link>
      <description>&lt;P&gt;I can see you've marked an answer, but given what you've posted that won't actually fix your issue. It will remove the notes from the log (possibly) but it will not read in the data correctly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 23:48:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-do-these-invalid-data-error-notes-mean/m-p/626377#M184743</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-02-20T23:48:51Z</dc:date>
    </item>
  </channel>
</rss>

