<?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: Importing issue when csv file has many cell blank in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Importing-issue-when-csv-file-has-many-cell-blank/m-p/402839#M97863</link>
    <description>&lt;P&gt;You save my day!!!&lt;/P&gt;
&lt;P&gt;Thanks a lot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HHC&lt;/P&gt;</description>
    <pubDate>Tue, 10 Oct 2017 16:35:29 GMT</pubDate>
    <dc:creator>hhchenfx</dc:creator>
    <dc:date>2017-10-10T16:35:29Z</dc:date>
    <item>
      <title>Importing issue when csv file has many cell blank</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issue-when-csv-file-has-many-cell-blank/m-p/402825#M97860</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I find that when a scv&amp;nbsp;file has&amp;nbsp;so many initial blank&amp;nbsp;cell,&amp;nbsp; my SAS code will not import correctly and it cause me trouble as I mentioned in the previous post (&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/Import-issue/m-p/402819#M97858" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/Import-issue/m-p/402819#M97858&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I create this sample file and I wish you could help me to import correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this file, the first column has number at the first cell and SAS import the last row correctly.&lt;/P&gt;
&lt;P&gt;For the other 2 column (bad1 bad2), many blank cell&amp;nbsp;on top which make SAS import wrong. the value 350 in bad1 (last row) turn to 3.&amp;nbsp;The value 2000 in bad2 turn to 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, I have to use Import in my work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile="...\error.csv"
out=error dbms=csv replace;
getnames=yes;
run;

data error; set error;
N=_N_;
if good^=. or bad1^=" " or Bad2^=" ";run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I really appreciate your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HC&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 16:21:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issue-when-csv-file-has-many-cell-blank/m-p/402825#M97860</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-10-10T16:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issue when csv file has many cell blank</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issue-when-csv-file-has-many-cell-blank/m-p/402834#M97862</link>
      <description>&lt;P&gt;Add a GUESSINGROWS option and make it a big number. Then PROC IMPORT will scan more records before it determines the types.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will slow down your processing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile="...\error.csv"
out=error dbms=csv replace;
getnames=yes;
guessingrows=1000000;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Oct 2017 16:28:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issue-when-csv-file-has-many-cell-blank/m-p/402834#M97862</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-10T16:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issue when csv file has many cell blank</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issue-when-csv-file-has-many-cell-blank/m-p/402839#M97863</link>
      <description>&lt;P&gt;You save my day!!!&lt;/P&gt;
&lt;P&gt;Thanks a lot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HHC&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 16:35:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issue-when-csv-file-has-many-cell-blank/m-p/402839#M97863</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-10-10T16:35:29Z</dc:date>
    </item>
  </channel>
</rss>

