<?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: Problem while importing CSV file. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Problem-while-importing-CSV-file/m-p/42999#M8810</link>
    <description>Doc will be right! As the junk is at the end of the last field, it will normally be part of the end-of-line string. &lt;BR /&gt;
In SAS92 infile option TERMSTR= solves the problem (like termstr=crlf)&lt;BR /&gt;
Before SAS92, just add the rogue character  to the DLM= value&lt;BR /&gt;
   infile ghjfghj dsd dlm='3b0a0d'x    ....etcetera... ;&lt;BR /&gt;
(where 3b is the hex value for semi-colons on most platforms) &lt;BR /&gt;
I added  0A0Dx among delimiters on an "all-inclusive" approach.  If normally treated as line-end characters, then they won't arrive in the infile buffer, but when they do, they'll be excluded from data values.</description>
    <pubDate>Fri, 02 Jul 2010 13:26:50 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2010-07-02T13:26:50Z</dc:date>
    <item>
      <title>Problem while importing CSV file.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-while-importing-CSV-file/m-p/42997#M8808</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
When I am importing CSV file into SAS , Junk value is getting inserted in last coloumn of every record. Please let me know if there is any option which remove junk values while importing. I am using Infile statement with following Options&lt;BR /&gt;
&lt;BR /&gt;
dlm=';' TRUNCOVER MISSOVER DSD  FIRSTOBS=2&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Thu, 01 Jul 2010 14:56:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-while-importing-CSV-file/m-p/42997#M8808</guid>
      <dc:creator>SASACC</dc:creator>
      <dc:date>2010-07-01T14:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while importing CSV file.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-while-importing-CSV-file/m-p/42998#M8809</link>
      <description>Looks like you are using the DATA step for the import.  &lt;BR /&gt;
&lt;BR /&gt;
Generally, this sort of thing is an indication of a problem in the incoming data stream.  You will need to do some detective work.  The first ones that I might look at are&lt;BR /&gt;
&lt;BR /&gt;
-- do you have "junk" at the end of the incoming record?  You should use a hex editor to look at the data line as there may be some non-display characters.&lt;BR /&gt;
-- did the .CSV file come from a different environment?  For instance, if it was created on a PC and you used a binary FTP transfer to get it to Unix, then the End-Of-Line character will be wrong and may cause errors.  Ditto the other way.&lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
      <pubDate>Thu, 01 Jul 2010 17:16:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-while-importing-CSV-file/m-p/42998#M8809</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-07-01T17:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while importing CSV file.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-while-importing-CSV-file/m-p/42999#M8810</link>
      <description>Doc will be right! As the junk is at the end of the last field, it will normally be part of the end-of-line string. &lt;BR /&gt;
In SAS92 infile option TERMSTR= solves the problem (like termstr=crlf)&lt;BR /&gt;
Before SAS92, just add the rogue character  to the DLM= value&lt;BR /&gt;
   infile ghjfghj dsd dlm='3b0a0d'x    ....etcetera... ;&lt;BR /&gt;
(where 3b is the hex value for semi-colons on most platforms) &lt;BR /&gt;
I added  0A0Dx among delimiters on an "all-inclusive" approach.  If normally treated as line-end characters, then they won't arrive in the infile buffer, but when they do, they'll be excluded from data values.</description>
      <pubDate>Fri, 02 Jul 2010 13:26:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-while-importing-CSV-file/m-p/42999#M8810</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-07-02T13:26:50Z</dc:date>
    </item>
  </channel>
</rss>

