<?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: proc import - unsuccessful (SAS Enterprise Guide 7.15) in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-unsuccessful-SAS-Enterprise-Guide-7-15/m-p/535339#M33050</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/261763"&gt;@dpadman&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As I import a txt file (with French characters) I notice that for certain rows SAS reads the &lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;delimiter (|)&lt;/FONT&gt; &lt;/STRONG&gt;as a character which then causes an invalid data error for subsequent variables. Please see snip below. FM should have actually been read as the next variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 385px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27126i0233668B1971A088/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Code I use is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC IMPORT DATAFILE=REFFILE&lt;BR /&gt;DBMS=&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;TAB&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;OUT= work.TESTDP replace;&lt;BR /&gt;guessingrows=100;&lt;BR /&gt;DELIMITER = '|';&lt;BR /&gt;GETNAMES=NO;&lt;/P&gt;
&lt;P&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You told proc import to use the TAB character as the delimiter but your question narrative says that you think | was the delimiter. Which is it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It may help to paste a few lines from the text file (assuming the values are not too sensitive) into a code box opened with the&amp;nbsp;forums {I} icon. Make sure that&amp;nbsp;if you do so you copy&amp;nbsp;text&amp;nbsp;using a text editor such as Notepad or the SAS editor.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Feb 2019 18:22:03 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-02-13T18:22:03Z</dc:date>
    <item>
      <title>proc import - unsuccessful (SAS Enterprise Guide 7.15)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-unsuccessful-SAS-Enterprise-Guide-7-15/m-p/535316#M33049</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I import a txt file (with French characters) I notice that for certain rows SAS reads the delimiter (|) as a character which then causes an invalid data error for subsequent variables. Please see snip below. FM should have actually been read as the next variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 385px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27126i0233668B1971A088/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Code I use is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC IMPORT DATAFILE=REFFILE&lt;BR /&gt;DBMS=TAB&lt;BR /&gt;OUT= work.TESTDP replace;&lt;BR /&gt;guessingrows=100;&lt;BR /&gt;DELIMITER = '|';&lt;BR /&gt;GETNAMES=NO;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 17:40:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-unsuccessful-SAS-Enterprise-Guide-7-15/m-p/535316#M33049</guid>
      <dc:creator>dpadman</dc:creator>
      <dc:date>2019-02-13T17:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: proc import - unsuccessful (SAS Enterprise Guide 7.15)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-unsuccessful-SAS-Enterprise-Guide-7-15/m-p/535339#M33050</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/261763"&gt;@dpadman&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As I import a txt file (with French characters) I notice that for certain rows SAS reads the &lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;delimiter (|)&lt;/FONT&gt; &lt;/STRONG&gt;as a character which then causes an invalid data error for subsequent variables. Please see snip below. FM should have actually been read as the next variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 385px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27126i0233668B1971A088/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Code I use is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC IMPORT DATAFILE=REFFILE&lt;BR /&gt;DBMS=&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;TAB&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;OUT= work.TESTDP replace;&lt;BR /&gt;guessingrows=100;&lt;BR /&gt;DELIMITER = '|';&lt;BR /&gt;GETNAMES=NO;&lt;/P&gt;
&lt;P&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You told proc import to use the TAB character as the delimiter but your question narrative says that you think | was the delimiter. Which is it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It may help to paste a few lines from the text file (assuming the values are not too sensitive) into a code box opened with the&amp;nbsp;forums {I} icon. Make sure that&amp;nbsp;if you do so you copy&amp;nbsp;text&amp;nbsp;using a text editor such as Notepad or the SAS editor.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 18:22:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-unsuccessful-SAS-Enterprise-Guide-7-15/m-p/535339#M33050</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-02-13T18:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: proc import - unsuccessful (SAS Enterprise Guide 7.15)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-unsuccessful-SAS-Enterprise-Guide-7-15/m-p/535347#M33051</link>
      <description>Sorry that was my bad. Even when i run the code with DBMS = DLM (for delimiters other than , or tab) the same error persists.&lt;BR /&gt;Can't post lines from the text file due to data privacy.</description>
      <pubDate>Wed, 13 Feb 2019 18:32:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-unsuccessful-SAS-Enterprise-Guide-7-15/m-p/535347#M33051</guid>
      <dc:creator>dpadman</dc:creator>
      <dc:date>2019-02-13T18:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: proc import - unsuccessful (SAS Enterprise Guide 7.15)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-unsuccessful-SAS-Enterprise-Guide-7-15/m-p/535364#M33052</link>
      <description>&lt;P&gt;If you are running into problems with PROC IMPORT then you may have to resort to a DATA step import where you have more control over the parsing of your data rows.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 19:03:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-unsuccessful-SAS-Enterprise-Guide-7-15/m-p/535364#M33052</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-02-13T19:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc import - unsuccessful (SAS Enterprise Guide 7.15)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-unsuccessful-SAS-Enterprise-Guide-7-15/m-p/535455#M33053</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/261763"&gt;@dpadman&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Sorry that was my bad. Even when i run the code with DBMS = DLM (for delimiters other than , or tab) the same error persists.&lt;BR /&gt;Can't post lines from the text file due to data privacy.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Can you make a text file that looks similar but with non-sensitive values.&lt;/P&gt;
&lt;P&gt;Instead of a name like "John" use "JJJJ". If you think the French characters are the issue pick one of those "words" that ends up with a | in the middle and replace the non-special characters with something like XXXX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Only need one or two lines that when you run proc import on with the same syntax behaves the same. Likely the example only needs 3 or 4 variables.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 23:38:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-unsuccessful-SAS-Enterprise-Guide-7-15/m-p/535455#M33053</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-02-13T23:38:17Z</dc:date>
    </item>
  </channel>
</rss>

