<?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: Adding a new numeric column with default value (null) to an existing dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Adding-a-new-numeric-column-with-default-value-null-to-an/m-p/615945#M180229</link>
    <description>&lt;P&gt;Are these variables you are trying to create already in the data set ALLDEALS?&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jan 2020 14:46:58 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-01-08T14:46:58Z</dc:date>
    <item>
      <title>Adding a new numeric column with default value (null) to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-a-new-numeric-column-with-default-value-null-to-an/m-p/615941#M180227</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To add a new numeric column with default value (null) to an existing dataset, which was imported using proc import, from xlsx file,&lt;/P&gt;&lt;P&gt;i thought this might work:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data alldeals2;	
	set alldeals;
	'% Acquired'n = .;
	'Debt Invested (in USD)'n = .;
	'Equity Invested (in USD)'n = .;
	'Bid Premium'n = .;
	'Per-share price'n = .;
	'Deal Summary'n = '';
	'Therapeutic Category'n = '';
	'Last Update'n = .;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When I run the code, variables initialized with numeric null (.) are character types. why ?&lt;/P&gt;&lt;P&gt;I even tried this way:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;'% Acquired'n = input('% Acquired'n, COMMA14.2);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but didn't work.&lt;/P&gt;&lt;P&gt;Please help me to make a new &amp;amp; null numeric variable.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 14:43:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-a-new-numeric-column-with-default-value-null-to-an/m-p/615941#M180227</guid>
      <dc:creator>jimmychoi</dc:creator>
      <dc:date>2020-01-08T14:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new numeric column with default value (null) to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-a-new-numeric-column-with-default-value-null-to-an/m-p/615945#M180229</link>
      <description>&lt;P&gt;Are these variables you are trying to create already in the data set ALLDEALS?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 14:46:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-a-new-numeric-column-with-default-value-null-to-an/m-p/615945#M180229</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-01-08T14:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new numeric column with default value (null) to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-a-new-numeric-column-with-default-value-null-to-an/m-p/616069#M180300</link>
      <description>No, they are all new</description>
      <pubDate>Wed, 08 Jan 2020 21:14:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-a-new-numeric-column-with-default-value-null-to-an/m-p/616069#M180300</guid>
      <dc:creator>jimmychoi</dc:creator>
      <dc:date>2020-01-08T21:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new numeric column with default value (null) to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-a-new-numeric-column-with-default-value-null-to-an/m-p/616078#M180301</link>
      <description>&lt;P&gt;If I remove the SET ALLDEALS; from your code, then try creating one of your variables, what does PROC CONTENTS say? It says the variable is numeric. So the command SET ALLDEALS; must be interfering somehow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data alldeals2;	
	'% Acquired'n = .;
run;

proc contents data=alldeals2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;Alphabetic List of Variables and Attributes

#    Variable      Type    Len

1    % Acquired    Num       8
&lt;/PRE&gt;
&lt;P&gt;&amp;gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 21:27:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-a-new-numeric-column-with-default-value-null-to-an/m-p/616078#M180301</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-01-08T21:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new numeric column with default value (null) to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-a-new-numeric-column-with-default-value-null-to-an/m-p/616122#M180320</link>
      <description>&lt;P&gt;First thing you should do: remove all special chars from all variable names and stick to the normal 26 letters, the underscore and numbers. Anything else must be moved to label, to maintain readable and maintainable code.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 06:27:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-a-new-numeric-column-with-default-value-null-to-an/m-p/616122#M180320</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-01-09T06:27:43Z</dc:date>
    </item>
  </channel>
</rss>

