<?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: force proc import to make column numeric in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/force-proc-import-to-make-column-numeric/m-p/359698#M84596</link>
    <description>&lt;P&gt;If your files referenced&amp;nbsp;&amp;amp;BaseFolder.&amp;amp;FileName&amp;nbsp;are supposed to have the same structure then they should be read with a data step where you have control.&lt;/P&gt;
&lt;P&gt;Proc Import is a guessing procedure and apparently the behavior is to guess that a column with missing values is character.&lt;/P&gt;
&lt;P&gt;A minor suggestion would be to bump the guessing rows up to 32000 but that may not help.&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2017 15:57:04 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-05-18T15:57:04Z</dc:date>
    <item>
      <title>force proc import to make column numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/force-proc-import-to-make-column-numeric/m-p/359688#M84593</link>
      <description>&lt;P&gt;I am currently using this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc import datafile="&amp;amp;BaseFolder.&amp;amp;FileName." 
out=LatestData replace;
guessingrows=10000;
run;&lt;/PRE&gt;&lt;P&gt;In most scenarios this works fine for a column X if it contains a number in the first 10000 rows. Sometimes my file's column is empty. How can I force proc import to use a numeric datatype for column X? Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 15:41:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/force-proc-import-to-make-column-numeric/m-p/359688#M84593</guid>
      <dc:creator>csetzkorn</dc:creator>
      <dc:date>2017-05-18T15:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: force proc import to make column numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/force-proc-import-to-make-column-numeric/m-p/359698#M84596</link>
      <description>&lt;P&gt;If your files referenced&amp;nbsp;&amp;amp;BaseFolder.&amp;amp;FileName&amp;nbsp;are supposed to have the same structure then they should be read with a data step where you have control.&lt;/P&gt;
&lt;P&gt;Proc Import is a guessing procedure and apparently the behavior is to guess that a column with missing values is character.&lt;/P&gt;
&lt;P&gt;A minor suggestion would be to bump the guessing rows up to 32000 but that may not help.&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 15:57:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/force-proc-import-to-make-column-numeric/m-p/359698#M84596</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-05-18T15:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: force proc import to make column numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/force-proc-import-to-make-column-numeric/m-p/359702#M84597</link>
      <description>&lt;P&gt;Right, proc imoprt is a Guessing Procedure. &amp;nbsp;It looks at the file and Guesses what the data looks like. &amp;nbsp;If you don't like its guess then its time for you to put the effort in to specify what each column should be. &amp;nbsp;Never rely on guessing procedures. &amp;nbsp;You can take the datastep code which proc import creates in the log, and then modify that to your needs, so it would look like:&lt;/P&gt;
&lt;PRE&gt;data want;
  infile "your-file";
  length  ...;
  informat ...;
  format ...;
  input ...;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 May 2017 16:01:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/force-proc-import-to-make-column-numeric/m-p/359702#M84597</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-18T16:01:25Z</dc:date>
    </item>
  </channel>
</rss>

