<?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 If missing (var1 var5 var13) then new_var = . in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/If-missing-var1-var5-var13-then-new-var/m-p/857926#M37860</link>
    <description>&lt;P&gt;What is the proper syntax for including multiple non-sequential variables as arguments in the parentheses after a missing statement?&lt;/P&gt;</description>
    <pubDate>Thu, 09 Feb 2023 04:26:26 GMT</pubDate>
    <dc:creator>_maldini_</dc:creator>
    <dc:date>2023-02-09T04:26:26Z</dc:date>
    <item>
      <title>If missing (var1 var5 var13) then new_var = .</title>
      <link>https://communities.sas.com/t5/New-SAS-User/If-missing-var1-var5-var13-then-new-var/m-p/857926#M37860</link>
      <description>&lt;P&gt;What is the proper syntax for including multiple non-sequential variables as arguments in the parentheses after a missing statement?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 04:26:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/If-missing-var1-var5-var13-then-new-var/m-p/857926#M37860</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2023-02-09T04:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: If missing (var1 var5 var13) then new_var = .</title>
      <link>https://communities.sas.com/t5/New-SAS-User/If-missing-var1-var5-var13-then-new-var/m-p/857931#M37862</link>
      <description>&lt;P&gt;You can NMISS() function if ALL of the variables are character.&amp;nbsp; Or use the CMISS() function if ANY of the variables are character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you just want to test if ANY of the variables are missing then do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if nmiss(of var1 var5 var13) then newvar=.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you need to test if ALL of the variables are missing and all of them are numeric then you could use the N() function instead.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if N(of var1&amp;nbsp;var5&amp;nbsp;var13)=0&amp;nbsp;then&amp;nbsp;newvar=.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if any are character then you need to know how many there are.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if cmiss(of var1&amp;nbsp;var5&amp;nbsp;var13)=3&amp;nbsp;then&amp;nbsp;newvar=.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 05:00:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/If-missing-var1-var5-var13-then-new-var/m-p/857931#M37862</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-02-09T05:00:53Z</dc:date>
    </item>
  </channel>
</rss>

