<?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: data step import - what is the right delimeter to use? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/data-step-import-what-is-the-right-delimeter-to-use/m-p/257199#M57221</link>
    <description>&lt;P&gt;Of course.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
 infile '/folders/myfolders/test.txt' firstobs=2 dsd truncover;
 input @;
 _infile_=prxchange('s/"([^",]+)"/$1/',-1,_infile_);
 INPUT
    location_id      : $CHAR10.
    pasid            : $CHAR20.
    address_type 	 : $CHAR10.
    address			 : $CHAR150.
    locality         : $CHAR100.
    postcode         : $CHAR25.
    state            : $CHAR25.
    country          : $CHAR25.
    from_date 		 : $CHAR10.
    to_date			 : $CHAR10.
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 17 Mar 2016 02:52:18 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-03-17T02:52:18Z</dc:date>
    <item>
      <title>data step import - what is the right delimeter to use?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-step-import-what-is-the-right-delimeter-to-use/m-p/257179#M57216</link>
      <description>&lt;P&gt;Hi guys.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to import a text file by using a datastep import. The following is the code I am using&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;DATA f_&amp;amp;filename;
    FORMAT
    location_id      $CHAR10.
    pasid            $CHAR20.
    address_type 	 $CHAR10.
    address			 $CHAR150.
    locality         $CHAR100.
    postcode         $CHAR25.
    state            $CHAR25.
    country          $CHAR25.
    from_date 		 $CHAR10.
    to_date			 $CHAR10.
	;
 INFILE "&amp;amp;fullLink"
	LRECL=275 firstobs=2
    DLM=","
    MISSOVER
    DSD ;
  INPUT
    location_id      : $CHAR10.
    pasid            : $CHAR20.
    address_type 	 : $CHAR10.
    address			 : $CHAR150.
    locality         : $CHAR100.
    postcode         : $CHAR25.
    state            : $CHAR25.
    country          : $CHAR25.
    from_date 		 : $CHAR10.
    to_date			 : $CHAR10.
;
 RUN;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The most of the records are brought in properly without any column mis-alignment (Like row 1 in the attached test.txt file).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However there are a about a dozen of records that are in the form row 2 is in - What is happening is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;""LIONS BRAE", EVERARD RD.," which should be taken into the address column is being broken into&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;""LIONS BRAE", and&amp;nbsp; EVERARD RD.,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Should I have set my delimeter to be something other than "," to prevent this from happening?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SAS experts please advise me.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Many thanks.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2016 00:03:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-step-import-what-is-the-right-delimeter-to-use/m-p/257179#M57216</guid>
      <dc:creator>willy06251</dc:creator>
      <dc:date>2016-03-17T00:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: data step import - what is the right delimeter to use?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-step-import-what-is-the-right-delimeter-to-use/m-p/257192#M57217</link>
      <description>&lt;P&gt;How about this :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename x '/folders/myfolders/correct.txt';
data _null_;
 infile '/folders/myfolders/test.txt';
 file x;
 input;
 _infile_=prxchange('s/"([^",]+)"/$1/',-1,_infile_);
 put _infile_;
run;
proc import datafile=x out=have dbms=csv replace;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Mar 2016 01:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-step-import-what-is-the-right-delimeter-to-use/m-p/257192#M57217</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-03-17T01:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: data step import - what is the right delimeter to use?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-step-import-what-is-the-right-delimeter-to-use/m-p/257198#M57220</link>
      <description>&lt;P&gt;Hi Xia.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I must stick with the data step import I have written as this is one of the 100 files that needs to be put in the same format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you be able to suggest a solution that can from modifying the current data step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2016 02:36:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-step-import-what-is-the-right-delimeter-to-use/m-p/257198#M57220</guid>
      <dc:creator>willy06251</dc:creator>
      <dc:date>2016-03-17T02:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: data step import - what is the right delimeter to use?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-step-import-what-is-the-right-delimeter-to-use/m-p/257199#M57221</link>
      <description>&lt;P&gt;Of course.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
 infile '/folders/myfolders/test.txt' firstobs=2 dsd truncover;
 input @;
 _infile_=prxchange('s/"([^",]+)"/$1/',-1,_infile_);
 INPUT
    location_id      : $CHAR10.
    pasid            : $CHAR20.
    address_type 	 : $CHAR10.
    address			 : $CHAR150.
    locality         : $CHAR100.
    postcode         : $CHAR25.
    state            : $CHAR25.
    country          : $CHAR25.
    from_date 		 : $CHAR10.
    to_date			 : $CHAR10.
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Mar 2016 02:52:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-step-import-what-is-the-right-delimeter-to-use/m-p/257199#M57221</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-03-17T02:52:18Z</dc:date>
    </item>
  </channel>
</rss>

