<?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: SAS BASE- Range conversion in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-BASE-Range-conversion/m-p/252268#M47850</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input age $20.;
dif=-1*input(resolve(cats('%sysevalf(',age,')')),best.);
cards;
18-24
15-30
29-54
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 25 Feb 2016 01:28:34 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-02-25T01:28:34Z</dc:date>
    <item>
      <title>SAS BASE- Range conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-BASE-Range-conversion/m-p/252137#M47783</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a variable "Age"&amp;nbsp;with Data as;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;18-24&lt;/P&gt;
&lt;P&gt;15-30&lt;/P&gt;
&lt;P&gt;29-54&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The variable is Character. How can I convert the range to numeric to calculate age range ie. 18-24 is 6 years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 18:35:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-BASE-Range-conversion/m-p/252137#M47783</guid>
      <dc:creator>SASEnthusiast</dc:creator>
      <dc:date>2016-02-24T18:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS BASE- Range conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-BASE-Range-conversion/m-p/252144#M47784</link>
      <description>&lt;P&gt;One way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;age_range = input(scan(age,2,'-'), 3.) - input(scan(age,1,'-'), 3.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might want to add 1 to the result, if you decide that 18-24 actually spans 7 years not 6.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 18:47:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-BASE-Range-conversion/m-p/252144#M47784</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-02-24T18:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS BASE- Range conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-BASE-Range-conversion/m-p/252146#M47785</link>
      <description>&lt;P&gt;data new_age;&lt;/P&gt;
&lt;P&gt;set test;&lt;/P&gt;
&lt;P&gt;new_age =&lt;FONT face="Courier New" size="3"&gt;(INPUT(SCAN(Age, -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;), &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;8.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;))-(INPUT(SCAN(Age, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;), &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;8.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;run;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 18:54:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-BASE-Range-conversion/m-p/252146#M47785</guid>
      <dc:creator>rkolupoti9001</dc:creator>
      <dc:date>2016-02-24T18:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS BASE- Range conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-BASE-Range-conversion/m-p/252268#M47850</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input age $20.;
dif=-1*input(resolve(cats('%sysevalf(',age,')')),best.);
cards;
18-24
15-30
29-54
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Feb 2016 01:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-BASE-Range-conversion/m-p/252268#M47850</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-02-25T01:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS BASE- Range conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-BASE-Range-conversion/m-p/252285#M47853</link>
      <description>&lt;P&gt;Very funny &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp﻿&lt;/a&gt;!&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 04:07:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-BASE-Range-conversion/m-p/252285#M47853</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-02-25T04:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS BASE- Range conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-BASE-Range-conversion/m-p/252303#M47859</link>
      <description>&lt;P&gt;Yeah. you can do it with any&amp;nbsp;algorithmic expression.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input age $20.;
dif=input(resolve(cats('%sysevalf(',age,')')),best.);
cards;
18-24
15*30
29/54
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Feb 2016 06:47:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-BASE-Range-conversion/m-p/252303#M47859</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-02-25T06:47:24Z</dc:date>
    </item>
  </channel>
</rss>

