<?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 how to code all variable names with different suffix in &amp;quot;IF&amp;quot; statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-code-all-variable-names-with-different-suffix-in-quot-IF/m-p/109166#M22700</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;I have character variables, abscode_1, abscode_2, ..., abscode_8. I'm going to use "if &amp;amp; else" statement in SAS to create a new variable by selecting all the variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;Here's my question. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;I am going to assign a new variable as missing if all the variables are missing. But I don't know how to code this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;I would appreciate your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Apr 2013 21:45:40 GMT</pubDate>
    <dc:creator>peachblozzom</dc:creator>
    <dc:date>2013-04-15T21:45:40Z</dc:date>
    <item>
      <title>how to code all variable names with different suffix in "IF" statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-code-all-variable-names-with-different-suffix-in-quot-IF/m-p/109166#M22700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;I have character variables, abscode_1, abscode_2, ..., abscode_8. I'm going to use "if &amp;amp; else" statement in SAS to create a new variable by selecting all the variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;Here's my question. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;I am going to assign a new variable as missing if all the variables are missing. But I don't know how to code this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;I would appreciate your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 21:45:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-code-all-variable-names-with-different-suffix-in-quot-IF/m-p/109166#M22700</guid>
      <dc:creator>peachblozzom</dc:creator>
      <dc:date>2013-04-15T21:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to code all variable names with different suffix in "IF" statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-code-all-variable-names-with-different-suffix-in-quot-IF/m-p/109167#M22701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming abscode_i are numeric :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if n(of abscode_:) = 0 then call missing (new_variable);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 22:21:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-code-all-variable-names-with-different-suffix-in-quot-IF/m-p/109167#M22701</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-04-15T22:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to code all variable names with different suffix in "IF" statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-code-all-variable-names-with-different-suffix-in-quot-IF/m-p/109168#M22702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Additional information to PGSTATS reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;n() ==&amp;gt; will count the no of non-missing values in all the variable listed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call missing will assign missing values to numeric or character variable which is listed in () so we need to decide the new variable typebefore using it in the function. or you can give it as New_variable=.;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 05:56:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-code-all-variable-names-with-different-suffix-in-quot-IF/m-p/109168#M22702</guid>
      <dc:creator>Sudhakar_A</dc:creator>
      <dc:date>2013-04-16T05:56:54Z</dc:date>
    </item>
  </channel>
</rss>

