<?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: Reading Text File -- Not Getting All Records In SAS Data Set? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/514249#M73201</link>
    <description>&lt;P&gt;I was using a variable length, only numeric data file. Below is how I tried - initially, before reading this thread - to read the file into SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code I used:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;infile "/folders/myfolders/Oct26/Runners.txt" ;&lt;BR /&gt;input amt 8.2;&lt;BR /&gt;run;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The flat text file I wanted to read with the above code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;12345678.90&lt;BR /&gt;12500.02&lt;BR /&gt;5.11&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;123456.78&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12500.02&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Part of SAS Log:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasNote"&gt;NOTE: 3 records were read from the infile "/folders/myfolders/Oct26/Runners.txt".&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;The minimum record length was 4.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;The maximum record length was 11.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The data set WORK.TEST has 2 observations and 1 variables.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.02 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.02 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;77 proc print;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;78 run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: There were 2 observations read from the data set WORK.TEST.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.17 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.09 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;The log says it read 3 records but still returned only 2 records to the SAS data set.&amp;nbsp;I tried varying combinations of the input data like 5 records, different numeric values but SAS would return alternate records based on the data I sent. And I didn't know where I was going wrong until I read this thread of messages.&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;After I used truncover, the issue was resolved:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;data test;&lt;BR /&gt;infile "/folders/myfolders/Oct26/Runners.txt" truncover;&lt;BR /&gt;input amt 8.2;&lt;BR /&gt;run;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&lt;STRONG&gt;output:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&lt;BR /&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;123456.78&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12500.02&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5.11&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I was wondering if there was an equivalent of $varying informat for reading numeric data :). Just curiousity &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But, thanks for the very informative explanation as always &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Abi&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Sun, 18 Nov 2018 15:59:39 GMT</pubDate>
    <dc:creator>Abby19</dc:creator>
    <dc:date>2018-11-18T15:59:39Z</dc:date>
    <item>
      <title>Reading Text File -- Not Getting All Records In SAS Data Set?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33140#M8027</link>
      <description>I'm using the following SAS code to read data in from the following text file.  When I run the code the SAS data set "detail" only contains 3 records?  Yet when I read the log it says it read all 7 records from the test file?  Where did the other 4 records go?  Help is appreciated.&lt;BR /&gt;
&lt;BR /&gt;
&lt;U&gt;er3detail.tx File contents&lt;/U&gt;&lt;BR /&gt;
Last Error Message: 23-2: Invalid option name SEX&lt;BR /&gt;
Last Warning Message:  The data set WORK.WORDGENDER may be &lt;BR /&gt;
Last Dataset Created: WORK.WORDGENDER&lt;BR /&gt;
Test Line 4&lt;BR /&gt;
Test Line 5&lt;BR /&gt;
Test Line 6&lt;BR /&gt;
  &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;U&gt;SAS Code:&lt;/U&gt;&lt;BR /&gt;
data detail; &lt;BR /&gt;
   length t $ 300;&lt;BR /&gt;
   infile "C:\WUSS14\er3detail.txt";&lt;BR /&gt;
   input t $ 1-300 ;&lt;BR /&gt;
  run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;U&gt;SAS LOG&lt;/U&gt;&lt;BR /&gt;
91&lt;BR /&gt;
92   data detail;&lt;BR /&gt;
93      length t $ 300;&lt;BR /&gt;
94      infile "C:\WUSS14\er3detail.txt";&lt;BR /&gt;
95      input t $ 1-300 ;&lt;BR /&gt;
96     run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The infile "C:\WUSS14\er3detail.txt" is:&lt;BR /&gt;
      Filename=C:\WUSS14\er3detail.txt,&lt;BR /&gt;
      RECFM=V,LRECL=256,File Size (bytes)=295,&lt;BR /&gt;
      Last Modified=12Nov2010:08:05:44,&lt;BR /&gt;
      Create Time=09Nov2010:19:22:20&lt;BR /&gt;
&lt;BR /&gt;
NOTE: 7 records were read from the infile "C:\WUSS14\er3detail.txt".&lt;BR /&gt;
      The minimum record length was 10.&lt;BR /&gt;
      The maximum record length was 140.&lt;BR /&gt;
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;BR /&gt;
NOTE: The data set WORK.DETAIL has 3 observations and 1 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.01 seconds&lt;BR /&gt;
      cpu time            0.00 seconds</description>
      <pubDate>Fri, 12 Nov 2010 15:30:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33140#M8027</guid>
      <dc:creator>MikeCa</dc:creator>
      <dc:date>2010-11-12T15:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Text File -- Not Getting All Records In SAS Data Set?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33141#M8028</link>
      <description>Hi:&lt;BR /&gt;
  When I find that I have variable length records (as indicated by this note in the log):&lt;BR /&gt;
[pre]&lt;BR /&gt;
The minimum record length was 10.&lt;BR /&gt;
The maximum record length was 140.&lt;BR /&gt;
[/pre]&lt;BR /&gt;
            &lt;BR /&gt;
I turn to the $VARYING. informat to read my variable length text lines. The program below worked for me when I saved the file into c:\temp\er3detail.txt (I removed a blank line from the bottom of the file, so I only have 6 lines.&lt;BR /&gt;
    &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
1662  data detail;&lt;BR /&gt;
1663  length t $ 300;&lt;BR /&gt;
1664  infile "C:\temp\er3detail.txt" length=lg;&lt;BR /&gt;
1665  input t $varying. lg;&lt;BR /&gt;
1666  run;&lt;BR /&gt;
                                  &lt;BR /&gt;
NOTE: The infile "C:\temp\er3detail.txt" is:&lt;BR /&gt;
      Filename=C:\temp\er3detail.txt,&lt;BR /&gt;
      RECFM=V,LRECL=256,File Size (bytes)=189,&lt;BR /&gt;
      Last Modified=12Nov2010:08:39:20,&lt;BR /&gt;
      Create Time=12Nov2010:08:39:18&lt;BR /&gt;
                            &lt;BR /&gt;
NOTE: 6 records were read from the infile "C:\temp\er3detail.txt".&lt;BR /&gt;
      The minimum record length was 11.&lt;BR /&gt;
      The maximum record length was 58.&lt;BR /&gt;
NOTE: The data set WORK.DETAIL has 6 observations and 1 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           1.84 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 12 Nov 2010 15:44:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33141#M8028</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-11-12T15:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Text File -- Not Getting All Records In SAS Data Set?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33142#M8029</link>
      <description>Awesome!  You made my day!  Thanks</description>
      <pubDate>Fri, 12 Nov 2010 15:58:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33142#M8029</guid>
      <dc:creator>MikeCa</dc:creator>
      <dc:date>2010-11-12T15:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Text File -- Not Getting All Records In SAS Data Set?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33143#M8030</link>
      <description>Wouldn't a simple "truncover" in the infile statement do the same trick without having to change informats?</description>
      <pubDate>Fri, 12 Nov 2010 22:09:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33143#M8030</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-11-12T22:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Text File -- Not Getting All Records In SAS Data Set?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33144#M8031</link>
      <description>Patrick:&lt;BR /&gt;
  Yes, you're right. I know there are instances where TRUNCOVER would work just as well. &lt;BR /&gt;
&lt;BR /&gt;
  I happen to be a fan of $VARYING. for reading free-format text fields. I use the LG variable to get rid of "empty" lines, and with files in some formats (such as when I'm scraping HTML or scraping the LOG), I can use LG (along with other criteria) to filter out some observations from being read or being written to the output file.&lt;BR /&gt;
 &lt;BR /&gt;
  This just looked like text scraping to me and so I picked $VARYING.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 12 Nov 2010 23:18:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33144#M8031</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-11-12T23:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Text File -- Not Getting All Records In SAS Data Set?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33145#M8032</link>
      <description>Hi Cynthia&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your explanation.&lt;BR /&gt;
&lt;BR /&gt;
Just to insist a bit more:&lt;BR /&gt;
" there are instances where TRUNCOVER would work just as well"&lt;BR /&gt;
&lt;BR /&gt;
In which instances wouldn't it work? I can't think of any?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Patrick</description>
      <pubDate>Fri, 12 Nov 2010 23:54:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33145#M8032</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-11-12T23:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Text File -- Not Getting All Records In SAS Data Set?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33146#M8033</link>
      <description>Patrick:&lt;BR /&gt;
  I am a "never say never" and "never say always" kind of girl. When I am text scraping I use $VARYING. You may use TRUNCOVER. This is "probably" an instance where either would work for the data that was posted. However, I remain a firm fan of $VARYING.&lt;BR /&gt;
 &lt;BR /&gt;
  As for your question...here's an instance:&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/5/411.html" target="_blank"&gt;http://support.sas.com/kb/5/411.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
  And I suspect I stopped using TRUNCOVER because of this or similar behavior in earlier versions of SAS:&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/32/889.html" target="_blank"&gt;http://support.sas.com/kb/32/889.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
  But as I said, I almost always use $VARYING. for text scraping. TRUNCOVER would not have been my suggestion unless there were more variables being read in the INPUT statement than just a possible 300 character line of text.&lt;BR /&gt;
                   &lt;BR /&gt;
  Just a preference. Do whatever you prefer. There's usually (note the "usually") more than one way to accomplish the same task with SAS.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Sat, 13 Nov 2010 00:56:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33146#M8033</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-11-13T00:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Text File -- Not Getting All Records In SAS Data Set?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33147#M8034</link>
      <description>Cynthia&lt;BR /&gt;
Learnt something new! Thanks!&lt;BR /&gt;
I just knew that it's worth bothering you a bit more &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Patrick</description>
      <pubDate>Sat, 13 Nov 2010 11:09:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/33147#M8034</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-11-13T11:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Text File -- Not Getting All Records In SAS Data Set?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/514153#M73199</link>
      <description>Hi Cynthia,&lt;BR /&gt;&lt;BR /&gt;What if my text file contains numeric values. I don't find the corresponding numeric informat for $varying. So, in this case i can use only truncover option?</description>
      <pubDate>Sat, 17 Nov 2018 20:34:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/514153#M73199</guid>
      <dc:creator>Abby19</dc:creator>
      <dc:date>2018-11-17T20:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Text File -- Not Getting All Records In SAS Data Set?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/514158#M73200</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt; As I explained, I use $VARYING for "screen scraping" or grabbing lines of text, as when someone sends me a mainframe report file, and I have to "scrape" data out of the mainframe report. Then I use $VARYING to read one entire line, numbers, letters, punctuation, and spaces and then, I typically with use SUBSTR or SCAN to break the big text string into smaller character and numeric chunks.&lt;BR /&gt;&lt;BR /&gt;I suspect you are not using screen scraping or text scraping, since you have numeric values. I cannot comment on whether TRUNCOVER would be required until you show your data. It really, really depends on what your data looks like. Is it fixed format? Is it delimited by some character? Are the numbers in "standard" numeric format or do your numbers have currency symbols and thousands separators, like commas? Consider these examples below. I would only use $VARYING. for the report, on the right. I would use standard INFILE and INPUT the other examples on the left.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="when_use_varying.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25014i6EFF235C349C064B/image-size/large?v=v2&amp;amp;px=999" role="button" title="when_use_varying.png" alt="when_use_varying.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sat, 17 Nov 2018 22:03:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/514158#M73200</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-11-17T22:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Text File -- Not Getting All Records In SAS Data Set?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/514249#M73201</link>
      <description>&lt;P&gt;I was using a variable length, only numeric data file. Below is how I tried - initially, before reading this thread - to read the file into SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code I used:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;infile "/folders/myfolders/Oct26/Runners.txt" ;&lt;BR /&gt;input amt 8.2;&lt;BR /&gt;run;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The flat text file I wanted to read with the above code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;12345678.90&lt;BR /&gt;12500.02&lt;BR /&gt;5.11&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;123456.78&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12500.02&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Part of SAS Log:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasNote"&gt;NOTE: 3 records were read from the infile "/folders/myfolders/Oct26/Runners.txt".&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;The minimum record length was 4.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;The maximum record length was 11.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The data set WORK.TEST has 2 observations and 1 variables.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.02 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.02 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;77 proc print;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;78 run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: There were 2 observations read from the data set WORK.TEST.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.17 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.09 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;The log says it read 3 records but still returned only 2 records to the SAS data set.&amp;nbsp;I tried varying combinations of the input data like 5 records, different numeric values but SAS would return alternate records based on the data I sent. And I didn't know where I was going wrong until I read this thread of messages.&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;After I used truncover, the issue was resolved:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;data test;&lt;BR /&gt;infile "/folders/myfolders/Oct26/Runners.txt" truncover;&lt;BR /&gt;input amt 8.2;&lt;BR /&gt;run;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&lt;STRONG&gt;output:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&lt;BR /&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;123456.78&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12500.02&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5.11&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I was wondering if there was an equivalent of $varying informat for reading numeric data :). Just curiousity &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But, thanks for the very informative explanation as always &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Abi&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 18 Nov 2018 15:59:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/514249#M73201</guid>
      <dc:creator>Abby19</dc:creator>
      <dc:date>2018-11-18T15:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Text File -- Not Getting All Records In SAS Data Set?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/514252#M73202</link>
      <description>&lt;P&gt;No need for either in that case. If you either remove the INFORMAT specification from the INPUT statement or add the colon modifier in front of it then you are using list mode input style and SAS will automatically read the next word in the file.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also note that you do NOT want to include a decimal part on your informat specification, unless you need to tell SAS where to place implied decimal point for source text that has been generated without them.&amp;nbsp; If you read the string '12345' with the 8.2 informat SAS will place the implied decimal point between the 3 and the 4 and the result will be 123.45 instead of 12,345.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For normal input there is no need for ANY informat specifications. SAS already knows how to read numbers and character strings without an special instructions.&amp;nbsp; It is only things like dates and time where&amp;nbsp;SAS needs help in understanding how to translate the human readable text into the internal value that it should store.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 16:12:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/514252#M73202</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-11-18T16:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Text File -- Not Getting All Records In SAS Data Set?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/514259#M73203</link>
      <description>Thx Tom. This helped me a lot!!</description>
      <pubDate>Sun, 18 Nov 2018 16:49:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-Text-File-Not-Getting-All-Records-In-SAS-Data-Set/m-p/514259#M73203</guid>
      <dc:creator>Abby19</dc:creator>
      <dc:date>2018-11-18T16:49:13Z</dc:date>
    </item>
  </channel>
</rss>

