<?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: SAS import file with text qualifier in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197543#M37013</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I specify the DLM=',' and DSD option. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Aug 2015 16:56:29 GMT</pubDate>
    <dc:creator>mikezhang</dc:creator>
    <dc:date>2015-08-12T16:56:29Z</dc:date>
    <item>
      <title>SAS import file with text qualifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197541#M37011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: #ffffff;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;"6/23/2015 8:55:36 AM,6/23/2015 7:57:55 AM,test,A B,""C, D "",E-MA,F,Personal G,G one,test - TWO THREE,""I LIKE APPLE"",""ONE, TWO"",FCB,6/27/2015 - 6/27/2016,6/23/2015,BIZ,Personal,MA,NY,Personal,Group,""NYC Ins. Companies"",,,""$NYC NY-MA, (Group)"",""$NYC NY-MA, (Group)"",,,,"&lt;/CODE&gt;&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: #ffffff;"&gt;The data looks like this but with 10k rows. I was first trying to use PROC IMPORT but it didn't recognize the comma(,) as a delimiter in the file. Then I tried DATA STEP INFILE but still didn't work out the problem.&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: #ffffff;"&gt;Does anyone have any experience importing files with text qualifiers?&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: #ffffff;"&gt;Thank you.&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: #ffffff;"&gt;-----------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: #ffffff;"&gt;Update&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: #ffffff;"&gt;I first attached .txt data and below is the .csv data.&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: #ffffff;"&gt;Raw data,&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 1547px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="19" width="1547"&gt;6/23/2015 8:28:23 AM,6/23/2015 7:31:48 AM,PERSON0,PERSON1,"LNAME, FNAME ",DT,AREA0,TYP_CD,CD_NEW,CD_R,"DISPOSTION","LNAME, FNAME",DATE,DATE1,TYPE1,TYPE2,AREA,AREA1,TYPE3,NAME,NAME,,,SERIES,SERIES2,,TYPE5,,&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expected data,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 1988px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="19" width="98"&gt;Var1&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="98"&gt;Var2&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var3&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var4&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var5&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var6&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var7&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var8&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var9&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var10&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var11&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var12&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var13&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var14&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var15&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var16&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var17&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var18&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var19&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var20&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var21&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var22&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var23&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var24&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var25&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var26&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var27&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var28&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var29&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Var30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="19" style="border-top: none;"&gt;6/23/2015 8:28&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;6/23/2015 7:31&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;PERSON0&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;PERSON1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;LNAME, FNAME &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;DT&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;AREA0&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;TYP_CD&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;CD_NEW&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;CD_R&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;DISPOSTION&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;LNAME, FNAME&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;DATE&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;DATE1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;TYPE1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;TYPE2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;AREA&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;AREA1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;TYPE3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NAME&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NAME&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;SERIES&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;SERIES2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;TYPE5&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 15:05:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197541#M37011</guid>
      <dc:creator>mikezhang</dc:creator>
      <dc:date>2015-08-12T15:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS import file with text qualifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197542#M37012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you specify DLM="," and dSD in your import code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 16:46:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197542#M37012</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-08-12T16:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS import file with text qualifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197543#M37013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I specify the DLM=',' and DSD option. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 16:56:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197543#M37013</guid>
      <dc:creator>mikezhang</dc:creator>
      <dc:date>2015-08-12T16:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS import file with text qualifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197544#M37014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suggest you might share what you would expect the resulting parsed, column-oriented data row to look like -- post an AFTER-parsing data representation. For example you have a quoted, character-type first column revealed, but that data-represented is not terminated with a closing double-quote, as far as I see with your pasted data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 17:00:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197544#M37014</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2015-08-12T17:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS import file with text qualifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197545#M37015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The proliferation of two double=quotes&amp;nbsp; ( "") in that data tends to make SAS see each of these rows below as a single variable, when using DLM=',' and DSD&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;specifies that when data values are enclosed in quotation marks, delimiters &lt;/P&gt;
&lt;P&gt;within the value are treated as character data&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;so NONE of your commas are seen as delimiters:&lt;/P&gt;&lt;P&gt;"6/23/2015 8:55:36 AM,6/23/2015 7:57:55 AM,test,A B," &lt;/P&gt;&lt;P&gt;"C, D " &lt;/P&gt;&lt;P&gt;",E-MA,F,Personal G,G one,test - TWO THREE,"&lt;/P&gt;&lt;P&gt;"I LIKE APPLE"&lt;/P&gt;&lt;P&gt;","&lt;/P&gt;&lt;P&gt;"ONE, TWO"&lt;/P&gt;&lt;P&gt;",FCB,6/27/2015 - 6/27/2016,6/23/2015,BIZ,Personal,MA,NY,Personal,Group,"&lt;/P&gt;&lt;P&gt;"NYC Ins. Companies"&lt;/P&gt;&lt;P&gt;",,,"&lt;/P&gt;&lt;P&gt;"$NYC NY-MA, (Group)"&lt;/P&gt;&lt;P&gt;","&lt;/P&gt;&lt;P&gt;"$NYC NY-MA, (Group)"&lt;/P&gt;&lt;P&gt;",,,,"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 19:02:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197545#M37015</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-08-12T19:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS import file with text qualifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197546#M37016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The double quotes are text qualifiers and I guess my issue is how to deal with them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The csv file is sort of different and it didn't treat comma as delimiter either.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 19:46:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197546#M37016</guid>
      <dc:creator>mikezhang</dc:creator>
      <dc:date>2015-08-12T19:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS import file with text qualifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197547#M37017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would expect a single double quote as a text identifier, which is also what SAS expects. Your very first value starts with a single double quote and starts looking for the next double quote to close the first variable, which occurs after a comma, so the comma cannot be treated as a delimiter. And since there is another " in what seems to be an inappropriate location that continues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, examine your "csv" file with a text editor, not a spreadsheet. You may see things that a spreadsheet hides.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 20:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-file-with-text-qualifier/m-p/197547#M37017</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-08-12T20:37:36Z</dc:date>
    </item>
  </channel>
</rss>

