<?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: unable to read messy raw data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/unable-to-read-messy-raw-data/m-p/457417#M115972</link>
    <description>&lt;P&gt;Do not expect text data pasted into a message window on this forum to match your actual text data as the software reformats it.&lt;/P&gt;
&lt;P&gt;Better is to paste text data into a code box opened using the forums {I} menu icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect that your actual data has TAB characters in it. Therefor the YEAR is likely&amp;nbsp;not actually in columns 7-12. consistently&lt;/P&gt;
&lt;P&gt;When I pasted your example data into in a text editor I get this:&lt;/P&gt;
&lt;PRE&gt;icc-M     1970       music:  03/14/2017          ipp-e     1989       music:  03/19/2018
iff-e       1880       music:  03/15/2017           ioo-p     1996       music:  03/10/2015
odd-w    2001       music: 03/16/2011           odd-p    1965       music: 03/01/2011
egg-o     2000       music: 03/17/2010           eee-w   1947       music: 03/04/2016
&lt;/PRE&gt;
&lt;P&gt;which shows the year appearing in different columns. Which will happen with tab replacements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might help to actually attach the data file as a TXT file so we can verify the actual contents.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW That does NOT qualify as messy data by a long shot. But it will require understanding of what happens when you read from 1) a fixed column that does not align with your actual data, 2) the actual location of where the column pointer when reading using the @'music:' column pointer and how it interacts with a format specified on the input statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should also post in a code box the very&amp;nbsp;likely invalid data messages with your code from the log.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Apr 2018 17:41:10 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-04-25T17:41:10Z</dc:date>
    <item>
      <title>unable to read messy raw data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unable-to-read-messy-raw-data/m-p/457358#M115953</link>
      <description>&lt;P&gt;Unable to read messy raw data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname Lesson08 '/home/coccus030/sasuser.v94/';&lt;BR /&gt;Data Lesson08.college09ds;&lt;BR /&gt;Infile '/home/coccus030/sasuser.v94/institutiondata.txt' firstobs=2;&lt;BR /&gt;Input GenderType &amp;amp; $5. Year 7-12 @ 'music:' Asofdate mmddyy10.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column style.&amp;nbsp; I copy and paste from text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Variable:GenderType Year AsofDate&lt;/P&gt;&lt;P&gt;icc-M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1970&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; music:&amp;nbsp; 03/14/2017&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ipp-e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1989&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; music:&amp;nbsp; 03/19/2018&lt;/P&gt;&lt;P&gt;iff-e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1880&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; music:&amp;nbsp; 03/15/2017&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; ioo-p&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1996&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; music:&amp;nbsp; 03/10/2015&lt;/P&gt;&lt;P&gt;odd-w&amp;nbsp;&amp;nbsp;&amp;nbsp; 2001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; music: 03/16/2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;odd-p&amp;nbsp;&amp;nbsp;&amp;nbsp; 1965&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; music: 03/01/2011&lt;/P&gt;&lt;P&gt;egg-o&amp;nbsp; &amp;nbsp;&amp;nbsp; 2000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; music: 03/17/2010&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eee-w&amp;nbsp;&amp;nbsp; 1947&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; music: 03/04/2016&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 15:26:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unable-to-read-messy-raw-data/m-p/457358#M115953</guid>
      <dc:creator>elsalam</dc:creator>
      <dc:date>2018-04-25T15:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: unable to read messy raw data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unable-to-read-messy-raw-data/m-p/457383#M115960</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
Input GenderType $ Year @'music:'+2 Asofdate mmddyy10. @@;
format Asofdate mmddyy10. ;
datalines;
icc-M     1970       music:  03/14/2017          ipp-e     1989       music:  03/19/2018
iff-e       1880       music:  03/15/2017           ioo-p     1996       music:  03/10/2015
odd-w    2001       music: 03/16/2011           odd-p    1965       music: 03/01/2011
egg-o     2000       music: 03/17/2010           eee-w   1947       music: 03/04/2016
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Apr 2018 16:18:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unable-to-read-messy-raw-data/m-p/457383#M115960</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-04-25T16:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: unable to read messy raw data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unable-to-read-messy-raw-data/m-p/457417#M115972</link>
      <description>&lt;P&gt;Do not expect text data pasted into a message window on this forum to match your actual text data as the software reformats it.&lt;/P&gt;
&lt;P&gt;Better is to paste text data into a code box opened using the forums {I} menu icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect that your actual data has TAB characters in it. Therefor the YEAR is likely&amp;nbsp;not actually in columns 7-12. consistently&lt;/P&gt;
&lt;P&gt;When I pasted your example data into in a text editor I get this:&lt;/P&gt;
&lt;PRE&gt;icc-M     1970       music:  03/14/2017          ipp-e     1989       music:  03/19/2018
iff-e       1880       music:  03/15/2017           ioo-p     1996       music:  03/10/2015
odd-w    2001       music: 03/16/2011           odd-p    1965       music: 03/01/2011
egg-o     2000       music: 03/17/2010           eee-w   1947       music: 03/04/2016
&lt;/PRE&gt;
&lt;P&gt;which shows the year appearing in different columns. Which will happen with tab replacements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might help to actually attach the data file as a TXT file so we can verify the actual contents.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW That does NOT qualify as messy data by a long shot. But it will require understanding of what happens when you read from 1) a fixed column that does not align with your actual data, 2) the actual location of where the column pointer when reading using the @'music:' column pointer and how it interacts with a format specified on the input statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should also post in a code box the very&amp;nbsp;likely invalid data messages with your code from the log.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 17:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unable-to-read-messy-raw-data/m-p/457417#M115972</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-25T17:41:10Z</dc:date>
    </item>
  </channel>
</rss>

