<?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 Import data from csv with some records jump to second line in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481681#M124637</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a raw data that some records move jump to second line (like below). The third line below is the continuation of the address for line 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I import the data using import wizard from EG, I was able to read this correctly.&amp;nbsp; However, when I do a "Generalize Import Step to run outside of EG", the code doesn't work and I still get the third line below read as third record and had invalid info for second record.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there anything I could do in the import sas base code to have this read correctly?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;288,10006S,Mrs.,J,Guildford,,I,No,No,XXXXXX Street,Bridgetown,NS,B0S 1C0,CA&lt;BR /&gt;289,10008S,Mr.,B,Len,,I,No,No,"200 Forties Rd&lt;BR /&gt;PO Box 128",New Ross,NS,B0J 2M0,CA&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jul 2018 20:34:51 GMT</pubDate>
    <dc:creator>devon59</dc:creator>
    <dc:date>2018-07-26T20:34:51Z</dc:date>
    <item>
      <title>Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481681#M124637</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a raw data that some records move jump to second line (like below). The third line below is the continuation of the address for line 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I import the data using import wizard from EG, I was able to read this correctly.&amp;nbsp; However, when I do a "Generalize Import Step to run outside of EG", the code doesn't work and I still get the third line below read as third record and had invalid info for second record.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there anything I could do in the import sas base code to have this read correctly?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;288,10006S,Mrs.,J,Guildford,,I,No,No,XXXXXX Street,Bridgetown,NS,B0S 1C0,CA&lt;BR /&gt;289,10008S,Mr.,B,Len,,I,No,No,"200 Forties Rd&lt;BR /&gt;PO Box 128",New Ross,NS,B0J 2M0,CA&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 20:34:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481681#M124637</guid>
      <dc:creator>devon59</dc:creator>
      <dc:date>2018-07-26T20:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481701#M124651</link>
      <description>&lt;P&gt;The EG&amp;nbsp;import wizard should have generated appropriate code that could be exported from EG or possibly found in the Log. Did you import from actual CSV or Excel? The symptom you show is common for people using the Alt-Enter to create a multiline entry in an Excel cell.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should show the code you have attempted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 22:05:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481701#M124651</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-07-26T22:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481827#M124718</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your reply.&amp;nbsp; Below is the code generated from EG.&amp;nbsp; I changed to infile path and dataset name to a valid name and that did not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;DATA WORK.'AZ_CRC FILE AUDIT _ CONSTIT_0000'n;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; LENGTH&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; consid&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cnbio_id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ 9&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; title&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $ 27&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $ 49&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $ 50&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; company&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $ 60&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; keyind&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ 1&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deceased&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ 3&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; novalidadd&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ 3&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; address&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $ 150&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; city&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ 49&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; province&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ 3&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ 11&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; country&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $ 3 ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; LABEL&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; consid&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= "Constituent_ConstituentID"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cnbio_id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= "ConID"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; title&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = "Title"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = "FirstName"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = "LastName"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; company&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = "OrgName"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; keyind&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= "KeyIndicator"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deceased&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= "Deceased"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; novalidadd&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= "HasNoValidAddresses"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; address&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = "AddressBlock"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; city&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= "City"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; province&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= "Province"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= "PostalCode"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; country&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = "Country" ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; FORMAT&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; consid&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BEST7.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cnbio_id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$CHAR9.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; title&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CHAR50.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CHAR50.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CHAR79.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; company&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CHAR60.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; keyind&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$CHAR1.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deceased&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$CHAR3.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; novalidadd&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$CHAR3.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; address&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CHAR150.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; city&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$CHAR49.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; province&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$CHAR3.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$CHAR12.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; country&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CHAR5. ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; INFORMAT&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; consid&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BEST6.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cnbio_id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$CHAR9.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; title&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CHAR27.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CHAR49.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CHAR50.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; company&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CHAR60.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; keyind&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$CHAR1.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deceased&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$CHAR3.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; novalidadd&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$CHAR3.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; address&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CHAR150.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; city&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$CHAR49.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; province&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$CHAR3.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$CHAR11.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; country&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $CHAR3. ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; INFILE 'C:\Users\bsimmons\AppData\&lt;WBR /&gt;Local\Temp\SEG9128\AZ-CRC File Audit - Constituents-&lt;WBR /&gt;726a9540afd24db2a7e2ae0eb59228&lt;WBR /&gt;4d.txt'&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LRECL=245&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ENCODING="WLATIN1"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TERMSTR=CRLF&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DLM='7F'x&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MISSOVER&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DSD ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; INPUT&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; consid&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: ?? BEST6.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cnbio_id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: $CHAR9.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; title&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : $CHAR27.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : $CHAR49.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : $CHAR50.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; company&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : $CHAR60.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; keyind&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: $CHAR1.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deceased&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: $CHAR3.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; novalidadd&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: $CHAR3.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; address&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : $CHAR150.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; city&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: $CHAR49.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; province&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: $CHAR3.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: $CHAR11.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; country&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : $CHAR3. ;&lt;/DIV&gt;
&lt;DIV&gt;RUN;&lt;/DIV&gt;</description>
      <pubDate>Fri, 27 Jul 2018 11:23:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481827#M124718</guid>
      <dc:creator>devon59</dc:creator>
      <dc:date>2018-07-27T11:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481859#M124723</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
length temp $ 8000;
retain temp;
input ;
temp=cats(temp,_infile_);
if countc(temp,',')=13 then do;
var1=scan(temp,1,',');
var2=scan(temp,2,',');
/*
var3=.......
var4=.....
*/

output;
call missing(temp);
end;
cards;
288,10006S,Mrs.,J,Guildford,,I,No,No,XXXXXX Street,Bridgetown,NS,B0S 1C0,CA
289,10008S,Mr.,B,Len,,I,No,No,"200 Forties Rd
PO Box 128",New Ross,NS,B0J 2M0,CA
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 13:47:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481859#M124723</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-07-27T13:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481865#M124725</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you so much!&amp;nbsp; This works.&amp;nbsp; However, I need a little clarification since I am not that familiar with cards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I actually read this data from a csv file, where and how do I reference that csv file in this code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you again&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 13:59:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481865#M124725</guid>
      <dc:creator>devon59</dc:creator>
      <dc:date>2018-07-27T13:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481870#M124728</link>
      <description>&lt;P&gt;Sure.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile 'c:\temp\temp.csv';
length temp $ 8000;
retain temp;
input ;
temp=cats(temp,_infile_);
if countc(temp,',')=13 then do;
var1=scan(temp,1,',');
var2=scan(temp,2,',');
/*
var3=.......
var4=.....
*/

output;
call missing(temp);
end;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 14:06:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481870#M124728</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-07-27T14:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481876#M124730</link>
      <description>&lt;P&gt;Thank you so much again for a quick reply.&amp;nbsp; I am almost there.&amp;nbsp; However, for some reasons, this code only read 13 records from the csv file.&amp;nbsp; Why is that?&amp;nbsp; The actual # of records on the file is 650k.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, how do I remove "" around each var?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 14:25:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481876#M124730</guid>
      <dc:creator>devon59</dc:creator>
      <dc:date>2018-07-27T14:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481877#M124731</link>
      <description>&lt;P&gt;Looks promising.&amp;nbsp; You should probably use the COUNTW() function instead of the COUNTC() function since then you could add the Q and M modifiers to handle quoted delimiters and empty fields properly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 14:29:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481877#M124731</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-27T14:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481968#M124762</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I still could not figure out why the code just read only the first 13 records.&amp;nbsp; Could you please help?&amp;nbsp; How could I read the whole data from csv file with 650k records with this code?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 18:10:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481968#M124762</guid>
      <dc:creator>devon59</dc:creator>
      <dc:date>2018-07-27T18:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481970#M124764</link>
      <description>&lt;P&gt;No idea.&amp;nbsp; Show us your SAS log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Copy the relevant lines from your log and paste them into the forum using the window that pops-up when you click on the {i} icon on the menu bar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 18:13:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481970#M124764</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-27T18:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481975#M124767</link>
      <description>&lt;P&gt;there's no error in log.&amp;nbsp; It just&amp;nbsp;&lt;SPAN&gt;654273&amp;nbsp;records were read but output showed 13 records.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;334 data have;&lt;BR /&gt;335 infile 'C:\temp.csv' delimiter = ','&lt;BR /&gt;335! MISSOVER DSD lrecl=32767 firstobs=2 ;&lt;BR /&gt;336 length temp $ 8000;&lt;BR /&gt;337 retain temp;&lt;BR /&gt;338 input ;&lt;BR /&gt;339 temp=cats(temp,_infile_);&lt;BR /&gt;340 if countc(temp,',')=13 then do;&lt;BR /&gt;341 var1=scan(temp,1,',');&lt;BR /&gt;342 var2=scan(temp,2,',');&lt;BR /&gt;343 var3=scan(temp,3,',');&lt;BR /&gt;344 var4=scan(temp,4,',');&lt;BR /&gt;345 var5=scan(temp,5,',');&lt;BR /&gt;346 var6=scan(temp,6,',');&lt;BR /&gt;347 var7=scan(temp,7,',');&lt;BR /&gt;348 var8=scan(temp,8,',');&lt;BR /&gt;349 var9=scan(temp,9,',');&lt;BR /&gt;350 var10=scan(temp,10,',');&lt;BR /&gt;351 var11=scan(temp,11,',');&lt;BR /&gt;352 var12=scan(temp,12,',');&lt;BR /&gt;353 var13=scan(temp,13,',');&lt;BR /&gt;354 /*&lt;BR /&gt;355 var3=.......&lt;BR /&gt;356 var4=.....&lt;BR /&gt;357 */&lt;BR /&gt;358&lt;BR /&gt;359 output;&lt;BR /&gt;360 call missing(temp);&lt;BR /&gt;361 end;&lt;BR /&gt;362 run;&lt;/P&gt;
&lt;P&gt;NOTE: The infile '&lt;SPAN&gt;C:\&lt;/SPAN&gt;&lt;SPAN&gt;temp&lt;/SPAN&gt;&lt;SPAN&gt;.csv&lt;/SPAN&gt;' is:&lt;BR /&gt; Filename=&lt;SPAN&gt;C:\&lt;/SPAN&gt;&lt;SPAN&gt;temp&lt;/SPAN&gt;&lt;SPAN&gt;.csv&lt;/SPAN&gt;,&lt;BR /&gt; RECFM=V,LRECL=32767,File Size (bytes)=69042694,&lt;BR /&gt; Last Modified=27Jul2018:10:15:14,&lt;BR /&gt; Create Time=27Jul2018:10:15:01&lt;/P&gt;
&lt;P&gt;NOTE: 654273 records were read from the infile '&lt;SPAN&gt;C:\&lt;/SPAN&gt;&lt;SPAN&gt;temp&lt;/SPAN&gt;&lt;SPAN&gt;.csv&lt;/SPAN&gt;'.&lt;BR /&gt; The minimum record length was 0.&lt;BR /&gt; The maximum record length was 223.&lt;BR /&gt;NOTE: The data set WORK.HAVE has 13 observations and 14 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt; real time 11.60 seconds&lt;BR /&gt; cpu time 11.54 seconds&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 18:20:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481975#M124767</guid>
      <dc:creator>devon59</dc:creator>
      <dc:date>2018-07-27T18:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481982#M124771</link>
      <description>&lt;P&gt;Sounds like you rarely generated lines with 13 commas in them.&amp;nbsp; A line with 13 commas would have 14 fields on it.&amp;nbsp; Perhaps 13 was not the right number to look for?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As I said before it is probably better to count the number of values on the line instead of just the number of delimiter characters.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So try using COUNTW(temp,',','mq') &amp;gt;= 14 .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since we don't know what your text file looks like you will need to debug this.&amp;nbsp; One thing you could do is tell your existing data step to dump some information to the log.&amp;nbsp; If you add this line just after the INPUT statement then you should see the top 20 lines of the file in the log.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if _n_ &amp;lt;= 20 then list ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 18:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481982#M124771</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-27T18:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481988#M124775</link>
      <description>&lt;P&gt;Wow.&amp;nbsp; thank you.&amp;nbsp; That changes kind of did the trick.&amp;nbsp; The&amp;nbsp;output now has&amp;nbsp;&lt;SPAN&gt;112514&amp;nbsp;observations&amp;nbsp; but it still doesn't read the whole thing.&amp;nbsp; Why is that?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;363 data have;&lt;BR /&gt;364 infile 'C:\temp.csv' delimiter = ','&lt;BR /&gt;364! MISSOVER DSD lrecl=32767 firstobs=2 ;&lt;BR /&gt;365 length temp $ 8000;&lt;BR /&gt;366 retain temp;&lt;BR /&gt;367 input ;&lt;BR /&gt;368 if _n_ &amp;lt;= 20 then list ;&lt;BR /&gt;369 temp=cats(temp,_infile_);&lt;BR /&gt;370 if COUNTW(temp,',','mq') &amp;gt;= 14 then do;&lt;BR /&gt;371 var1=scan(temp,1,',');&lt;BR /&gt;372 var2=scan(temp,2,',');&lt;BR /&gt;373 var3=scan(temp,3,',');&lt;BR /&gt;374 var4=scan(temp,4,',');&lt;BR /&gt;375 var5=scan(temp,5,',');&lt;BR /&gt;376 var6=scan(temp,6,',');&lt;BR /&gt;377 var7=scan(temp,7,',');&lt;BR /&gt;378 var8=scan(temp,8,',');&lt;BR /&gt;379 var9=scan(temp,9,',');&lt;BR /&gt;380 var10=scan(temp,10,',');&lt;BR /&gt;381 var11=scan(temp,11,',');&lt;BR /&gt;382 var12=scan(temp,12,',');&lt;BR /&gt;383 var13=scan(temp,13,',');&lt;BR /&gt;384 /*&lt;BR /&gt;385 var3=.......&lt;BR /&gt;386 var4=.....&lt;BR /&gt;387 */&lt;BR /&gt;388&lt;BR /&gt;389 output;&lt;BR /&gt;390 call missing(temp);&lt;BR /&gt;391 end;&lt;BR /&gt;392 run;&lt;/P&gt;
&lt;P&gt;NOTE: The infile '&lt;SPAN&gt;C:\temp.csv&lt;/SPAN&gt;' is:&lt;BR /&gt; Filename=&lt;SPAN&gt;C:\temp.csv&lt;/SPAN&gt;.csv,&lt;BR /&gt; RECFM=V,LRECL=32767,File Size (bytes)=69042694,&lt;BR /&gt; Last Modified=27Jul2018:10:15:14,&lt;BR /&gt; Create Time=27Jul2018:10:15:01&lt;/P&gt;
&lt;P&gt;RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+&lt;BR /&gt;2 "282","10000S","Mr.","Donald","Mundle","","I","No","No","PO Box 183","Pugwash","NS","&lt;BR /&gt; 86 B0K 1L0","CA" 98&lt;BR /&gt;3 "283","10001S","Mr.","Florence","Raney","","I","No","No","RR 1","Lower L'ardoise","NS&lt;BR /&gt; 86 ","B0E 1W0","CA" 101&lt;BR /&gt;4 "284","10002S","Miss","Kaye","Martin","","I","No","No","PO Box 166","Whycocomagh","NS&lt;BR /&gt; 86 ","B0E 3M0","CA" 101&lt;BR /&gt;5 "285","10003S","Mr.","Grant","Goodine","","I","No","No","PO Box 670","Bridgetown","NS&lt;BR /&gt; 86 ","B0S 1C0","CA" 101&lt;BR /&gt;6 "286","10004S","Mrs.","Myrtle","Macumber","","I","No","No","RR 1","Walton","NS","B0N&lt;BR /&gt;RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+&lt;BR /&gt; 86 2R0","CA" 94&lt;BR /&gt;7 "287","10005S","Ms.","Daisy","MacPhee","","I","No","No","PO Box 28","Shubenacadie","N&lt;BR /&gt; 86 S","B0N 2H0","CA" 102&lt;BR /&gt;8 "288","10006S","Mrs.","Joyce","Guild","","I","No","No","Jeffery Street","Bridgetown",&lt;BR /&gt; 86 "NS","B0S 1C0","CA" 104&lt;BR /&gt;9 "289","10008S","Mr.","Basil","Lenihan","","I","No","No","200 Forties Rd 71&lt;BR /&gt;10 PO Box 128","New Ross","NS","B0J 2M0","CA" 42&lt;BR /&gt;11 "290","10009S","Mr.","George","Melanson","","I","No","Yes","7093 Hwy 101","Plympton",&lt;BR /&gt; 86 "NS","B0W 2R0","CA" 104&lt;BR /&gt;12 "291","1000S","Mr.","Gregory","Dugas","","I","No","No","General Delivery","Alder Poin&lt;BR /&gt; 86 t","NS","B0C 1A0","CA" 107&lt;BR /&gt;13 "292","10010S","Mr.","Kenneth","d'Entremont","","I","No","No","PO Box 127","Lowere We&lt;BR /&gt; 86 st Pubnico","NS","B0W 2C0","CA" 116&lt;BR /&gt;14 "293","10011S","","","","Weymouth Drug Store Ltd.","O","No","No","PO Box 119","Weymou&lt;BR /&gt; 86 th","NS","B0W 3T0","CA" 108&lt;BR /&gt;15 "295","10012S","Mrs.","Lydia","Brewer","","I","No","No","PO Box 688","Bridgetown","NS&lt;BR /&gt; 86 ","B0S 1C0","CA" 101&lt;BR /&gt;16 "296","10013S","Mrs.","Gladys","McLaughlin","","I","No","No","Centennial Apt.21, Bo",&lt;BR /&gt; 86 "Bridgetown","NS","B0S 1C0","CA" 117&lt;BR /&gt;17 "297","10014S","Ms.","Jane","Wightman","","I","No","No","64 Granville St W","Bridgeto&lt;BR /&gt; 86 wn","NS","B0S 1C0","CA" 108&lt;BR /&gt;18 "298","10016S","Ms.","Anna","MacCarthy","","I","No","No","PO Box 1006","Windsor","NS"&lt;BR /&gt; 86 ,"B0N 2T0","CA" 100&lt;BR /&gt;19 "299","10017S","Ms.","Kathleen","Barr","","I","No","No","RR 2","Weymouth","NS","B0W 3&lt;BR /&gt; 86 T0","CA" 93&lt;BR /&gt;20 "300","10019S","Mrs.","Elizabeth","Gordon","","I","No","No","RR 1 Po","Milford Statio&lt;BR /&gt; 86 n","NS","B0N 1Y0","CA" 107&lt;BR /&gt;21 "301","1001S","Mrs.","Wong","Lee","","I","No","No","6264 North Street","Halifax","NS"&lt;BR /&gt; 86 ,"B3L 1P5","CA" 100&lt;BR /&gt;NOTE: 654273 records were read from the infile '&lt;SPAN&gt;C:\temp&lt;/SPAN&gt;.csv'.&lt;BR /&gt; The minimum record length was 0.&lt;BR /&gt; The maximum record length was 223.&lt;BR /&gt;NOTE: The data set WORK.HAVE has 112514 observations and 14 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt; real time 1:39.06&lt;BR /&gt; cpu time 22.93 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 19:04:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/481988#M124775</guid>
      <dc:creator>devon59</dc:creator>
      <dc:date>2018-07-27T19:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/482025#M124790</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16859"&gt;@devon59&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you so much again for a quick reply.&amp;nbsp; I am almost there.&amp;nbsp; However, for some reasons, this code only read 13 records from the csv file.&amp;nbsp; Why is that?&amp;nbsp; The actual # of records on the file is 650k.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, how do I remove "" around each var?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Copy your code and notes from the log. Paste into a code box opened on the forum using the {I} menu icon.&lt;/P&gt;
&lt;P&gt;I suspect something other than just infile,&amp;nbsp;informat, format and input statements. Something involving an IF perhaps.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 20:06:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/482025#M124790</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-07-27T20:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/482029#M124792</link>
      <description>&lt;PRE&gt;data have;
infile 'C:\temp.csv' delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ;
length temp $ 8000;
retain temp;
input ;
if _n_ &amp;lt;= 20 then list ;
temp=cats(temp,_infile_);
if COUNTW(temp,',','mq') &amp;gt;= 14 then do;
var1=scan(temp,1,',');
var2=scan(temp,2,',');
var3=scan(temp,3,',');
var4=scan(temp,4,',');
var5=scan(temp,5,',');
var6=scan(temp,6,',');
var7=scan(temp,7,',');
var8=scan(temp,8,',');
var9=scan(temp,9,',');
var10=scan(temp,10,',');
var11=scan(temp,11,',');
var12=scan(temp,12,',');
var13=scan(temp,13,',');
/*
var3=.......
var4=.....
*/

output;
call missing(temp);
end;
run;


363  data have;
364  infile 'C:\temp.csv' delimiter = ','
364! MISSOVER DSD lrecl=32767 firstobs=2 ;
365  length temp $ 8000;
366  retain temp;
367  input ;
368  if _n_ &amp;lt;= 20 then list ;
369  temp=cats(temp,_infile_);
370  if COUNTW(temp,',','mq') &amp;gt;= 14 then do;
371  var1=scan(temp,1,',');
372  var2=scan(temp,2,',');
373  var3=scan(temp,3,',');
374  var4=scan(temp,4,',');
375  var5=scan(temp,5,',');
376  var6=scan(temp,6,',');
377  var7=scan(temp,7,',');
378  var8=scan(temp,8,',');
379  var9=scan(temp,9,',');
380  var10=scan(temp,10,',');
381  var11=scan(temp,11,',');
382  var12=scan(temp,12,',');
383  var13=scan(temp,13,',');
384  /*
385  var3=.......
386  var4=.....
387  */
388
389  output;
390  call missing(temp);
391  end;
392  run;

NOTE: The infile 'C:\temp.csv' is:
      Filename=C:\temp.csv,
      RECFM=V,LRECL=32767,File Size (bytes)=69042694,
      Last Modified=27Jul2018:10:15:14,
      Create Time=27Jul2018:10:15:01

RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+
2         "282","10000S","Mr.","Donald","Mundle","","I","No","No","PO Box 183","Pugwash","NS","
      86  B0K 1L0","CA" 98
3         "283","10001S","Mr.","Florence","Raney","","I","No","No","RR 1","Lower L'ardoise","NS
      86  ","B0E 1W0","CA" 101
4         "284","10002S","Miss","Kaye","Martin","","I","No","No","PO Box 166","Whycocomagh","NS
      86  ","B0E 3M0","CA" 101
5         "285","10003S","Mr.","Grant","Goodine","","I","No","No","PO Box 670","Bridgetown","NS
      86  ","B0S 1C0","CA" 101
6         "286","10004S","Mrs.","Myrtle","Macumber","","I","No","No","RR 1","Walton","NS","B0N
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+
      86  2R0","CA" 94
7         "287","10005S","Ms.","Daisy","MacPhee","","I","No","No","PO Box 28","Shubenacadie","N
      86  S","B0N 2H0","CA" 102
8         "288","10006S","Mrs.","Joyce","Guild","","I","No","No","Jeffery Street","Bridgetown",
      86  "NS","B0S 1C0","CA" 104
9         "289","10008S","Mr.","Basil","Lenihan","","I","No","No","200 Forties Rd 71
10        PO Box 128","New Ross","NS","B0J 2M0","CA" 42
11        "290","10009S","Mr.","George","Melanson","","I","No","Yes","7093 Hwy 101","Plympton",
      86  "NS","B0W 2R0","CA" 104
12        "291","1000S","Mr.","Gregory","Dugas","","I","No","No","General Delivery","Alder Poin
      86  t","NS","B0C 1A0","CA" 107
13        "292","10010S","Mr.","Kenneth","d'Entremont","","I","No","No","PO Box 127","Lowere We
      86  st Pubnico","NS","B0W 2C0","CA" 116
14        "293","10011S","","","","Weymouth Drug Store Ltd.","O","No","No","PO Box 119","Weymou
      86  th","NS","B0W 3T0","CA" 108
15        "295","10012S","Mrs.","Lydia","Brewer","","I","No","No","PO Box 688","Bridgetown","NS
      86  ","B0S 1C0","CA" 101
16        "296","10013S","Mrs.","Gladys","McLaughlin","","I","No","No","Centennial Apt.21, Bo",
      86  "Bridgetown","NS","B0S 1C0","CA" 117
17        "297","10014S","Ms.","Jane","Wightman","","I","No","No","64 Granville St W","Bridgeto
      86  wn","NS","B0S 1C0","CA" 108
18        "298","10016S","Ms.","Anna","MacCarthy","","I","No","No","PO Box 1006","Windsor","NS"
      86  ,"B0N 2T0","CA" 100
19        "299","10017S","Ms.","Kathleen","Barr","","I","No","No","RR 2","Weymouth","NS","B0W 3
      86  T0","CA" 93
20        "300","10019S","Mrs.","Elizabeth","Gordon","","I","No","No","RR 1 Po","Milford Statio
      86  n","NS","B0N 1Y0","CA" 107
21        "301","1001S","Mrs.","Wong","Lee","","I","No","No","6264 North Street","Halifax","NS"
      86  ,"B3L 1P5","CA" 100
NOTE: 654273 records were read from the infile 'C:\temp.csv'.
      The minimum record length was 0.
      The maximum record length was 223.
NOTE: The data set WORK.HAVE has 112514 observations and 14 variables.
NOTE: DATA statement used (Total process time):
      real time           1:39.06
      cpu time            22.93 seconds


&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 20:16:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/482029#M124792</guid>
      <dc:creator>devon59</dc:creator>
      <dc:date>2018-07-27T20:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/482115#M124818</link>
      <description>&lt;P&gt;Your output statement is inside a block that will only output when&lt;/P&gt;
&lt;PRE&gt;if COUNTW(temp,',','mq') &amp;gt;= 14&lt;/PRE&gt;
&lt;P&gt;so some "short" combinations might not output as intended.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm also wondering if perhaps instead of&lt;/P&gt;
&lt;P&gt;call missing(temp);&lt;/P&gt;
&lt;P&gt;should be something to reduce temp to values after var13.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 23:25:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/482115#M124818</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-07-27T23:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/482167#M124840</link>
      <description>&lt;P&gt;Using NotePad++ open that csv and see the term string is CR or LF (at south-east corner).&lt;/P&gt;
&lt;P&gt;and add an option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;infile 'C:\temp.csv' delimiter = ',' termstr=CRLF;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;infile 'C:\temp.csv' delimiter = ',' termstr=LF;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jul 2018 11:00:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/482167#M124840</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-07-28T11:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from csv with some records jump to second line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/482188#M124851</link>
      <description>&lt;P&gt;Search on this forum as this question has been answered many times already.&lt;/P&gt;
&lt;P&gt;Here is a synopsis of best solutions in order or prefernce.&lt;/P&gt;
&lt;P&gt;1) Fix it at the source if you can. That is have whoever gave your the file with embedded line breaks create version that does not have the embedded line breaks.&lt;/P&gt;
&lt;P&gt;2) See if SAS can handle it anyway.&amp;nbsp; If you are lucky the lines are terminated with CR+LF characters and the embedded line breaks are using just LF (or just CR).&amp;nbsp; If so just adding the TERMSTR=CRLF option to your INFILE statement will let SAS read it without any extra work.&lt;/P&gt;
&lt;P&gt;3) Run a data step to copy the original file to a new fixed file.&amp;nbsp; This is where you might try to use the COUNTW() trick to figure out when you have embedded line breaks and remove them. Another method is to count the quotes on the line and if a line break occurs when the number of quotes is odd then remove the line break.&amp;nbsp; Once you have a fixed version of the file with only one line per observation then just read it normally using data step. Or you could even let PROC IMPORT try to guess what the variable names and types are for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jul 2018 17:50:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-csv-with-some-records-jump-to-second-line/m-p/482188#M124851</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-28T17:50:23Z</dc:date>
    </item>
  </channel>
</rss>

