<?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: Why does SAS stops reading an external file after a certain field? in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Why-does-SAS-stops-reading-an-external-file-after-a-certain/m-p/228783#M5584</link>
    <description>&lt;P&gt;Hi Bruno,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just changed the delimiter settings to pipe "|" via Control Panel, opened the Excel file, and saved it as a CSV&amp;nbsp;file with the extension .txt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the SAS log. I'm converting the txt file using SAS EG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;57 %macro import_data;&lt;BR /&gt;58 data work.pipe212;&lt;BR /&gt;59 infile "&amp;amp;input.\&amp;amp;source..txt"&lt;BR /&gt;60 lrecl=32767&lt;BR /&gt;61 firstobs=2&lt;BR /&gt;62 encoding="WLATIN1"&lt;BR /&gt;63 termstr=CRLF&lt;BR /&gt;64 dlm='|'&lt;BR /&gt;65 missover&lt;BR /&gt;66 dsd&lt;BR /&gt;67 ignoredoseof;&lt;BR /&gt;68 input&lt;BR /&gt;69 %do i=1 %to &amp;amp;total;&lt;BR /&gt;70 &amp;amp;&amp;amp;field&amp;amp;i&lt;BR /&gt;71 %end;&lt;BR /&gt;72 ;&lt;BR /&gt;73 run;&lt;BR /&gt;74 %mend;&lt;BR /&gt;75 %import_data;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: The infile "E:\SAS_AC\98 SAS References\Import Pipe DLM to SAS\SOL_PIPE.txt" is:&lt;BR /&gt; Filename=E:\SAS_AC\98 SAS References\Import Pipe DLM to SAS\SOL_PIPE.txt,&lt;BR /&gt; RECFM=V,LRECL=32767,&lt;BR /&gt; File Size (bytes)=196517682,&lt;BR /&gt; Last Modified=29Sep2015:16:50:58,&lt;BR /&gt; Create Time=29Sep2015:16:50:40&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: 69312 records were read from the infile "E:\SAS_AC\98 SAS References\Import Pipe DLM to SAS\SOL_PIPE.txt".&lt;BR /&gt;3 The SAS System 16:02 Wednesday, October 7, 2015&lt;/P&gt;
&lt;P&gt;The minimum record length was 606.&lt;BR /&gt; The maximum record length was 32767.&lt;BR /&gt; One or more lines were truncated.&lt;BR /&gt;NOTE: The data set WORK.PIPE212 has 69312 observations and 66 variables.&lt;BR /&gt;NOTE: Compressing data set WORK.PIPE212 decreased size by 96.57 percent. &lt;BR /&gt; Compressed is 792 pages; un-compressed would require 23104 pages.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt; real time 6.11 seconds&lt;BR /&gt; cpu time 4.52 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Angelique&lt;/P&gt;</description>
    <pubDate>Wed, 07 Oct 2015 08:09:06 GMT</pubDate>
    <dc:creator>angeliquec</dc:creator>
    <dc:date>2015-10-07T08:09:06Z</dc:date>
    <item>
      <title>Why does SAS stops reading an external file after a certain field?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Why-does-SAS-stops-reading-an-external-file-after-a-certain/m-p/228778#M5582</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a source Excel file from our Data Management Team. I converted this file to pipe-delimited text file for import purposes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used the data step, infile with with the IGNOREDOSEOF statement to convert this text file to SAS. After import, I found that there was a row whose fields SAS left blank after this certain long field (appearing to be more than 32767 characters). Rows after that problematic row appear to be intact.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps a special character or a hidden character causes this occurence? I would like to know how can SAS ignore that character, and continue reading the rest of the row's data.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 07:40:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Why-does-SAS-stops-reading-an-external-file-after-a-certain/m-p/228778#M5582</guid>
      <dc:creator>angeliquec</dc:creator>
      <dc:date>2015-10-07T07:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why does SAS stops reading an external file after a certain field?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Why-does-SAS-stops-reading-an-external-file-after-a-certain/m-p/228780#M5583</link>
      <description>&lt;P&gt;Please post the SAS log, this will help in diagnosing the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How did you convert the Excel file to the text file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 07:55:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Why-does-SAS-stops-reading-an-external-file-after-a-certain/m-p/228780#M5583</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2015-10-07T07:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Why does SAS stops reading an external file after a certain field?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Why-does-SAS-stops-reading-an-external-file-after-a-certain/m-p/228783#M5584</link>
      <description>&lt;P&gt;Hi Bruno,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just changed the delimiter settings to pipe "|" via Control Panel, opened the Excel file, and saved it as a CSV&amp;nbsp;file with the extension .txt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the SAS log. I'm converting the txt file using SAS EG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;57 %macro import_data;&lt;BR /&gt;58 data work.pipe212;&lt;BR /&gt;59 infile "&amp;amp;input.\&amp;amp;source..txt"&lt;BR /&gt;60 lrecl=32767&lt;BR /&gt;61 firstobs=2&lt;BR /&gt;62 encoding="WLATIN1"&lt;BR /&gt;63 termstr=CRLF&lt;BR /&gt;64 dlm='|'&lt;BR /&gt;65 missover&lt;BR /&gt;66 dsd&lt;BR /&gt;67 ignoredoseof;&lt;BR /&gt;68 input&lt;BR /&gt;69 %do i=1 %to &amp;amp;total;&lt;BR /&gt;70 &amp;amp;&amp;amp;field&amp;amp;i&lt;BR /&gt;71 %end;&lt;BR /&gt;72 ;&lt;BR /&gt;73 run;&lt;BR /&gt;74 %mend;&lt;BR /&gt;75 %import_data;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: The infile "E:\SAS_AC\98 SAS References\Import Pipe DLM to SAS\SOL_PIPE.txt" is:&lt;BR /&gt; Filename=E:\SAS_AC\98 SAS References\Import Pipe DLM to SAS\SOL_PIPE.txt,&lt;BR /&gt; RECFM=V,LRECL=32767,&lt;BR /&gt; File Size (bytes)=196517682,&lt;BR /&gt; Last Modified=29Sep2015:16:50:58,&lt;BR /&gt; Create Time=29Sep2015:16:50:40&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: 69312 records were read from the infile "E:\SAS_AC\98 SAS References\Import Pipe DLM to SAS\SOL_PIPE.txt".&lt;BR /&gt;3 The SAS System 16:02 Wednesday, October 7, 2015&lt;/P&gt;
&lt;P&gt;The minimum record length was 606.&lt;BR /&gt; The maximum record length was 32767.&lt;BR /&gt; One or more lines were truncated.&lt;BR /&gt;NOTE: The data set WORK.PIPE212 has 69312 observations and 66 variables.&lt;BR /&gt;NOTE: Compressing data set WORK.PIPE212 decreased size by 96.57 percent. &lt;BR /&gt; Compressed is 792 pages; un-compressed would require 23104 pages.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt; real time 6.11 seconds&lt;BR /&gt; cpu time 4.52 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Angelique&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 08:09:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Why-does-SAS-stops-reading-an-external-file-after-a-certain/m-p/228783#M5584</guid>
      <dc:creator>angeliquec</dc:creator>
      <dc:date>2015-10-07T08:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why does SAS stops reading an external file after a certain field?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Why-does-SAS-stops-reading-an-external-file-after-a-certain/m-p/228785#M5585</link>
      <description>&lt;P&gt;The SAS Log says:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;NOTE: 69312 records were read from the infile "E:\SAS_AC\98 SAS References\Import Pipe DLM to SAS\SOL_PIPE.txt".&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;3 The SAS System 16:02 Wednesday, October 7, 2015&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;The minimum record length was 606.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; The maximum record length was 32767.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; One or more lines were truncated.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you increase the value for the LRECL= option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bruno&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 08:27:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Why-does-SAS-stops-reading-an-external-file-after-a-certain/m-p/228785#M5585</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2015-10-07T08:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why does SAS stops reading an external file after a certain field?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Why-does-SAS-stops-reading-an-external-file-after-a-certain/m-p/229043#M5600</link>
      <description>&lt;P&gt;Hi Bruno,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I increased the LRECL to 100000 and got the result I was expecting. All the fields were read by SAS. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 05:14:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Why-does-SAS-stops-reading-an-external-file-after-a-certain/m-p/229043#M5600</guid>
      <dc:creator>angeliquec</dc:creator>
      <dc:date>2015-10-08T05:14:48Z</dc:date>
    </item>
  </channel>
</rss>

