<?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: Create a new variable based on the value of another  variable in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Create-a-new-variable-based-on-the-value-of-another-variable/m-p/370408#M11194</link>
    <description>&lt;PRE&gt;IF ROLE_IN_REFERRAL in( 'x', 'y' , 'z')
THEN AGE_AT_RFRL_CHLD = age_at_referral;&lt;BR /&gt;ELSE AGE_AT_RFRL_CHLD = . ;&lt;/PRE&gt;</description>
    <pubDate>Mon, 26 Jun 2017 00:42:41 GMT</pubDate>
    <dc:creator>kiranv_</dc:creator>
    <dc:date>2017-06-26T00:42:41Z</dc:date>
    <item>
      <title>Create a new variable based on the value of another  variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Create-a-new-variable-based-on-the-value-of-another-variable/m-p/370398#M11191</link>
      <description>&lt;P&gt;I want to create a new variable based on specidif conditions. If the conditions are met, I want that new variable to carry the value that is in a different variable:&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;PRE&gt;IF (ROLE_IN_REFERRAL = 'x' or    
ROLE_IN_REFERRAL = 'y' or  
ROLE_IN_REFERRAL = 'z')
THEN AGE_AT_RFRL_CHLD = 

use the value(in this case the age)  that is in variable: (age_at_referral) &lt;BR /&gt;ELSE AGE_AT_RFRL_CHLD = . ;
run;&lt;/PRE&gt;</description>
      <pubDate>Sun, 25 Jun 2017 23:13:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Create-a-new-variable-based-on-the-value-of-another-variable/m-p/370398#M11191</guid>
      <dc:creator>AnnaNZ</dc:creator>
      <dc:date>2017-06-25T23:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new variable based on the value of another  variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Create-a-new-variable-based-on-the-value-of-another-variable/m-p/370400#M11192</link>
      <description>&lt;P&gt;This is pretty straightforward, but two questions first:&lt;/P&gt;
&lt;P&gt;1. Which SAS environment are you trying to do this in (Base SAS, Enterprise Guide, DI Studio, ...).&lt;/P&gt;
&lt;P&gt;2. It looks like ROLE_IN_REFERRAL is character, and age_at_referral and AGE_AT_RFRL_CHILD are both numeric. Please confirm.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2017 23:20:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Create-a-new-variable-based-on-the-value-of-another-variable/m-p/370400#M11192</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2017-06-25T23:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new variable based on the value of another  variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Create-a-new-variable-based-on-the-value-of-another-variable/m-p/370401#M11193</link>
      <description>&lt;P&gt;Hi Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I work with SAS9.4&lt;/P&gt;&lt;P&gt;and yes ROLE_IN_REFERRAL is character, and age_at_referral and AGE_AT_RFRL_CHILD are both numeric&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2017 23:25:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Create-a-new-variable-based-on-the-value-of-another-variable/m-p/370401#M11193</guid>
      <dc:creator>AnnaNZ</dc:creator>
      <dc:date>2017-06-25T23:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new variable based on the value of another  variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Create-a-new-variable-based-on-the-value-of-another-variable/m-p/370408#M11194</link>
      <description>&lt;PRE&gt;IF ROLE_IN_REFERRAL in( 'x', 'y' , 'z')
THEN AGE_AT_RFRL_CHLD = age_at_referral;&lt;BR /&gt;ELSE AGE_AT_RFRL_CHLD = . ;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Jun 2017 00:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Create-a-new-variable-based-on-the-value-of-another-variable/m-p/370408#M11194</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2017-06-26T00:42:41Z</dc:date>
    </item>
  </channel>
</rss>

