<?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: SAS only reading every other record- Please help me! in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160686#M8360</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Easiest would be if you could attach your file. It has an extension of .prn but the log message you refer to actually implies it's a simple text file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not writing explicitly then SAS uses a lot of defaults. This helps you normally to get to results with less coding but for a newby it can be tricky because something might not work and you don't know why. It's most of the time about changing the default by coding for it explicitly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;record length was 256&lt;/SPAN&gt;" is the maximum number of characters SAS will read in a line. If your row is longer then it will get truncated. LRECL allows you to define a longer record length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you might try:&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;infile 'c:\mydata.prn' lrcl=1000 truncover;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;input ....&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Dec 2014 01:05:25 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2014-12-23T01:05:25Z</dc:date>
    <item>
      <title>SAS only reading every other record- Please help me!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160683#M8357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am writing because I am having an issue inputing data into SAS. I have a spreadsheet of 136 rows and 19 columns. SAS is only recognizing 68 records and a varying number of observations and I am really losing my mind because I have never encountered this before, and when I tested each column to see if one of them was the culprit (adding each column's data via datalines) they were all read as 136!. It is only when I try to import the whole spreadsheet either via datalines or infile 'c:\.....' that it doesn't work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Things I have tried: &lt;/P&gt;&lt;P&gt;- infile 'c:\mydata.prn';&lt;/P&gt;&lt;P&gt;-datalines;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-putting a blank row in between each column of my excel spreadsheet before converting it to prn for use with SAS.&lt;/P&gt;&lt;P&gt;-making the columns in my excel sheet very wide and centering the numbers before converting to prn&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has any ideas about why this might be happening or solutions (perhaps uploading each variable separately and then combining, if this is a possibility) please please let me know!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best wishes!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Dec 2014 00:42:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160683#M8357</guid>
      <dc:creator>vmuoio</dc:creator>
      <dc:date>2014-12-23T00:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAS only reading every other record- Please help me!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160684#M8358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also I forgot to add that in the log, it is telling me that the minimum and maximum record length was 256 (not sure what this means as I only have 136 rows in my spreadsheet and 19 columns) and that one or more lines were truncated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Dec 2014 00:43:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160684#M8358</guid>
      <dc:creator>vmuoio</dc:creator>
      <dc:date>2014-12-23T00:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS only reading every other record- Please help me!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160685#M8359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You probably just need to add TRUNCOVER and LRECL options to your INFILE statement.&lt;/P&gt;&lt;P&gt;LRECL should be set to something much larger than 256.&lt;/P&gt;&lt;P&gt;TRUNCOVER will tell to NOT go to a new line when there are too few values on the current line for the number of variables you are trying to read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save the file as CSV from Excel. &lt;/P&gt;&lt;P&gt;Try just reading all of the columns as text and see what you get.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile 'myfile.csv'&amp;nbsp; dsd lrecl=30000 truncover termstr=crlf ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length col1-col19 $200 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input col1-col19 ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Dec 2014 01:03:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160685#M8359</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-12-23T01:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS only reading every other record- Please help me!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160686#M8360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Easiest would be if you could attach your file. It has an extension of .prn but the log message you refer to actually implies it's a simple text file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not writing explicitly then SAS uses a lot of defaults. This helps you normally to get to results with less coding but for a newby it can be tricky because something might not work and you don't know why. It's most of the time about changing the default by coding for it explicitly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;record length was 256&lt;/SPAN&gt;" is the maximum number of characters SAS will read in a line. If your row is longer then it will get truncated. LRECL allows you to define a longer record length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you might try:&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;infile 'c:\mydata.prn' lrcl=1000 truncover;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;input ....&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Dec 2014 01:05:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160686#M8360</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-12-23T01:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS only reading every other record- Please help me!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160687#M8361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Tom, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANK YOU SO MUCH!!!!!!! I have spent at least 20 hours trying to do this. I so so so appreciate your help!!!!!!!! IT now says that 136 records were read that the data set had 136 observations and 19 variables. Does this mean that everything is there?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wish you a very very very merry Christmas and happy new year!!! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Dec 2014 01:29:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160687#M8361</guid>
      <dc:creator>vmuoio</dc:creator>
      <dc:date>2014-12-23T01:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAS only reading every other record- Please help me!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160688#M8362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With such as small file just use PROC PRINT to look at what it read.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Dec 2014 01:43:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160688#M8362</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-12-23T01:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS only reading every other record- Please help me!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160689#M8363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please mark the question answered as well &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Dec 2014 02:19:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-only-reading-every-other-record-Please-help-me/m-p/160689#M8363</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-12-23T02:19:11Z</dc:date>
    </item>
  </channel>
</rss>

