<?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 Variable name contains name of other variable, get that value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Variable-name-contains-name-of-other-variable-get-that-value/m-p/751639#M236638</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've got a dataset that looks like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA work.kip ;
  LENGTH ref $7. q1_2019 q2_2019 q3_2019 q4_2019 8. ;
  INFILE CARDS TRUNCOVER ;
  INPUT ref q1_2019 q2_2019 q3_2019 q4_2019 ;
  CARDS ;
q1_2019 1369 3625 3679 36875
q3_2019 6369 4587 5637 8963
q2_2019 123 456 789 123
q2_2019 3568 69876 3685 7896
;
RUN ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The REF variable contains the name of the variable I would like to store in a new variable AMOUNT. I could use an IF THEN ELSE statement, but I is there a way to get the value of the variable name stored in REF?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jul 2021 07:50:45 GMT</pubDate>
    <dc:creator>ThierryHerrie</dc:creator>
    <dc:date>2021-07-02T07:50:45Z</dc:date>
    <item>
      <title>Variable name contains name of other variable, get that value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-name-contains-name-of-other-variable-get-that-value/m-p/751639#M236638</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've got a dataset that looks like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA work.kip ;
  LENGTH ref $7. q1_2019 q2_2019 q3_2019 q4_2019 8. ;
  INFILE CARDS TRUNCOVER ;
  INPUT ref q1_2019 q2_2019 q3_2019 q4_2019 ;
  CARDS ;
q1_2019 1369 3625 3679 36875
q3_2019 6369 4587 5637 8963
q2_2019 123 456 789 123
q2_2019 3568 69876 3685 7896
;
RUN ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The REF variable contains the name of the variable I would like to store in a new variable AMOUNT. I could use an IF THEN ELSE statement, but I is there a way to get the value of the variable name stored in REF?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 07:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-name-contains-name-of-other-variable-get-that-value/m-p/751639#M236638</guid>
      <dc:creator>ThierryHerrie</dc:creator>
      <dc:date>2021-07-02T07:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Variable name contains name of other variable, get that value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-name-contains-name-of-other-variable-get-that-value/m-p/751643#M236642</link>
      <description>Take a look at the VVALUEX function.</description>
      <pubDate>Fri, 02 Jul 2021 08:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-name-contains-name-of-other-variable-get-that-value/m-p/751643#M236642</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2021-07-02T08:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Variable name contains name of other variable, get that value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-name-contains-name-of-other-variable-get-that-value/m-p/751651#M236645</link>
      <description>Many thanks! Works like a charm.</description>
      <pubDate>Fri, 02 Jul 2021 08:28:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-name-contains-name-of-other-variable-get-that-value/m-p/751651#M236645</guid>
      <dc:creator>ThierryHerrie</dc:creator>
      <dc:date>2021-07-02T08:28:42Z</dc:date>
    </item>
  </channel>
</rss>

