<?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: Including blank values from CSV import in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Including-blank-values-from-CSV-import/m-p/735984#M229282</link>
    <description>&lt;P&gt;Try the DSD option and TRUNCOVER.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile "\\...MyFile.csv" DSD firstobs=2 TRUNCOVER;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For your percent you may want an informat instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; length state county $24;
  informat rate percent.;
 input State $ County $ FIPS  Population Total  rate  score  ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/264750"&gt;@RandoDando&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am importing a CSV file which has blank values in a numeric field.&amp;nbsp; The blanks are in delimited file as simply two sequential commas.&amp;nbsp; &amp;nbsp;I want to read those as . but SAS is skipping over them.&amp;nbsp; I tried the MISSOVER option but it is still going to the next variable.&amp;nbsp; The variable with the missing values is "Rate".&amp;nbsp; It is in the CSV file as percents (with the % signs), so I had to specify the :percent. format option then change it to Percent10.2 after the import.&amp;nbsp; I want blanks to be imported as blanks (which is . for numeric data).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data one;
 infile "\\...MyFile.csv" dlm=',' firstobs=2 missover  ;
 length state county $24;
 input State $ County $ FIPS  Population Total  rate :percent. score  ;
rename county = county_name;
format rate Percent10.2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Apr 2021 14:23:39 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-04-21T14:23:39Z</dc:date>
    <item>
      <title>Including blank values from CSV import</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Including-blank-values-from-CSV-import/m-p/735981#M229280</link>
      <description>&lt;P&gt;I am importing a CSV file which has blank values in a numeric field.&amp;nbsp; The blanks are in delimited file as simply two sequential commas.&amp;nbsp; &amp;nbsp;I want to read those as . but SAS is skipping over them.&amp;nbsp; I tried the MISSOVER option but it is still going to the next variable.&amp;nbsp; The variable with the missing values is "Rate".&amp;nbsp; It is in the CSV file as percents (with the % signs), so I had to specify the :percent. format option then change it to Percent10.2 after the import.&amp;nbsp; I want blanks to be imported as blanks (which is . for numeric data).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data one;
 infile "\\...MyFile.csv" dlm=',' firstobs=2 missover  ;
 length state county $24;
 input State $ County $ FIPS  Population Total  rate :percent. score  ;
rename county = county_name;
format rate Percent10.2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 14:18:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Including-blank-values-from-CSV-import/m-p/735981#M229280</guid>
      <dc:creator>RandoDando</dc:creator>
      <dc:date>2021-04-21T14:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Including blank values from CSV import</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Including-blank-values-from-CSV-import/m-p/735984#M229282</link>
      <description>&lt;P&gt;Try the DSD option and TRUNCOVER.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile "\\...MyFile.csv" DSD firstobs=2 TRUNCOVER;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For your percent you may want an informat instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; length state county $24;
  informat rate percent.;
 input State $ County $ FIPS  Population Total  rate  score  ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/264750"&gt;@RandoDando&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am importing a CSV file which has blank values in a numeric field.&amp;nbsp; The blanks are in delimited file as simply two sequential commas.&amp;nbsp; &amp;nbsp;I want to read those as . but SAS is skipping over them.&amp;nbsp; I tried the MISSOVER option but it is still going to the next variable.&amp;nbsp; The variable with the missing values is "Rate".&amp;nbsp; It is in the CSV file as percents (with the % signs), so I had to specify the :percent. format option then change it to Percent10.2 after the import.&amp;nbsp; I want blanks to be imported as blanks (which is . for numeric data).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data one;
 infile "\\...MyFile.csv" dlm=',' firstobs=2 missover  ;
 length state county $24;
 input State $ County $ FIPS  Population Total  rate :percent. score  ;
rename county = county_name;
format rate Percent10.2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 14:23:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Including-blank-values-from-CSV-import/m-p/735984#M229282</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-04-21T14:23:39Z</dc:date>
    </item>
  </channel>
</rss>

