<?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: identifying variable value within a set of variables with similiar names in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/identifying-variable-value-within-a-set-of-variables-with/m-p/90532#M19164</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Array() is your friend:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; array test $4. fab1-fab60;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do over test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if test=:'02' then new_var=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Mar 2013 19:16:15 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2013-03-27T19:16:15Z</dc:date>
    <item>
      <title>identifying variable value within a set of variables with similiar names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identifying-variable-value-within-a-set-of-variables-with/m-p/90531#M19163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear SAS Users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perhaps you can provide me with an elegant way to solve the following issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data set contains a set of variables named fab* where * is a number from 1 to 60. The variables contain a four digit code. I want to create a dummer variable fabid. It should have the value 1 if the two first digits equal 02 in one of the values of the 60 fab* variables for one observation. Is there a quick way to avoid writing an if condition without refering to all 60 variables' names?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Dennis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 19:08:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identifying-variable-value-within-a-set-of-variables-with/m-p/90531#M19163</guid>
      <dc:creator>dennisl</dc:creator>
      <dc:date>2013-03-27T19:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: identifying variable value within a set of variables with similiar names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identifying-variable-value-within-a-set-of-variables-with/m-p/90532#M19164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Array() is your friend:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; array test $4. fab1-fab60;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do over test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if test=:'02' then new_var=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 19:16:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identifying-variable-value-within-a-set-of-variables-with/m-p/90532#M19164</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-03-27T19:16:15Z</dc:date>
    </item>
  </channel>
</rss>

