<?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 (+) 2 numeric variables together in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188124#M265820</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That seems to work on the adding the 2 variables thanks, but now month_date shows just a full stop now? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Sep 2014 16:38:13 GMT</pubDate>
    <dc:creator>anonymous_user</dc:creator>
    <dc:date>2014-09-05T16:38:13Z</dc:date>
    <item>
      <title>Adding (+) 2 numeric variables together</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188121#M265817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;The final statement im trying to add 'Age' plus 'Year but It doesnt work, I just get a a full stop, anyone know why my code wont add the 2 variable, both numeric?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;I have had to create 'Customer age profile' to obtain the 'Age' and a second statement 'Term years to get the 'Year'. Im then joining the 2 tables to create the third statement 'Add age and year'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/*Customer Age Profile*/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table work.borrower_age as&lt;BR /&gt;select &lt;BR /&gt;AccountNo as accnum,&lt;BR /&gt;int(yrdif(DATE_OF_BIRTH,today(),'ACTUAL')) as Age&lt;/P&gt;&lt;P&gt;from &lt;BR /&gt;green.optimum201302;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/*Term Years*/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table work.term_years as&lt;BR /&gt;select &lt;BR /&gt;distinct month_date,&lt;BR /&gt;accnum,&lt;BR /&gt;round(remaining_term_months/12,1) as year&lt;/P&gt;&lt;P&gt;from work.dataset_basel;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/*Add Age and Year*/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;&amp;nbsp; create table work.age_at_term as&lt;BR /&gt;&amp;nbsp; select&lt;BR /&gt;&amp;nbsp; b.month_date,&lt;BR /&gt;&amp;nbsp; a.accnum, &lt;BR /&gt;&amp;nbsp; a.age + b.year as age_term&lt;/P&gt;&lt;P&gt;&amp;nbsp; from &lt;BR /&gt;&amp;nbsp; work.borrower_age as a&lt;BR /&gt;&amp;nbsp; left join work.term_years as b&lt;BR /&gt;&amp;nbsp; on a.accnum = b.accnum;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 16:26:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188121#M265817</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2014-09-05T16:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Adding (+) 2 numeric variables together</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188122#M265818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;&amp;nbsp; create table work.age_at_term as&lt;BR /&gt;&amp;nbsp; select&lt;BR /&gt;&amp;nbsp; b.month_date,&lt;BR /&gt;&amp;nbsp; a.accnum, &lt;BR /&gt;&amp;nbsp; &lt;STRONG&gt;sum(a.age, b.year,0) as age_term &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; from &lt;BR /&gt;&amp;nbsp; work.borrower_age as a&lt;BR /&gt;&amp;nbsp; left join work.term_years as b&lt;BR /&gt;&amp;nbsp; on a.accnum = b.accnum;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 16:30:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188122#M265818</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-09-05T16:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Adding (+) 2 numeric variables together</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188123#M265819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be easy to get a solution if you give use the data what you have and what you want. With out ooking at the data, its not that easy to solve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 16:30:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188123#M265819</guid>
      <dc:creator>Hima</dc:creator>
      <dc:date>2014-09-05T16:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Adding (+) 2 numeric variables together</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188124#M265820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That seems to work on the adding the 2 variables thanks, but now month_date shows just a full stop now? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 16:38:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188124#M265820</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2014-09-05T16:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Adding (+) 2 numeric variables together</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188125#M265821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does this happen after making changes in syntax?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 16:45:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188125#M265821</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-09-05T16:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Adding (+) 2 numeric variables together</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188126#M265822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have just tested it and it appears to have the full stop before the syntax change, any reason as to why this might be? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 16:50:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188126#M265822</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2014-09-05T16:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Adding (+) 2 numeric variables together</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188127#M265823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure about your data structure. I would suggest check your source tables to validate this. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 16:57:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188127#M265823</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-09-05T16:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Adding (+) 2 numeric variables together</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188128#M265824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ive just been sampling the data and the year and age isn't adding up either. I didn't check it correctly in the first instance sorry so im still requiring help on this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 17:01:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188128#M265824</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2014-09-05T17:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Adding (+) 2 numeric variables together</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188129#M265825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are you getting in age_term variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 17:06:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188129#M265825</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-09-05T17:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding (+) 2 numeric variables together</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188130#M265826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to provide more info for us to tell you why something doesn't work, specifically how isn't it correct. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can replicate the problem with fake data and post the fake data and code here. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 17:08:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-2-numeric-variables-together/m-p/188130#M265826</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-09-05T17:08:42Z</dc:date>
    </item>
  </channel>
</rss>

