<?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: Search Missing List in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Search-Missing-List/m-p/665678#M199079</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;already gave you an excellent answer.&amp;nbsp; Just to elaborate on one point ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your original program, the value that you evaluated was score1-score3.&amp;nbsp; This is interpreted as score1 minus score3, which is why score2 played no role in the outcome.&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jun 2020 01:36:57 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2020-06-29T01:36:57Z</dc:date>
    <item>
      <title>Search Missing List</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Search-Missing-List/m-p/665671#M199077</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just trying to see if there is a way to search for missing characters within this list. When I output the data, take still comes out to be complete even if there is a missing value in score 2. I thought the syntax below but I guess missing() only returns for one variable because when I run the data the only one that will come out incomplete when there is a missing score is score 1. What do I have to do in order to just search multiple variables? I know the easy answer would just be to do an OR clause but let's assume there are tons of scores. would it really be necessary to right 20 different OR's?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data udemy.scoredata_all;&lt;BR /&gt;set udemy.score_data;&lt;BR /&gt;if not missing(score1-score3) then take = 'complete';&lt;BR /&gt;else take = 'incomplete';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jake&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 00:33:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Search-Missing-List/m-p/665671#M199077</guid>
      <dc:creator>skatethejake</dc:creator>
      <dc:date>2020-06-29T00:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Search Missing List</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Search-Missing-List/m-p/665674#M199078</link>
      <description>&lt;P&gt;One option:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input score1 score2 score3;
  datalines;
1 2 3
. 2 3
1 . 3
1 . .
. . .
. . 3
;

data want;
  set have;
  length take $10.;
  if n(score1,score2,score3) = 3 then
    take = 'complete';
  else take = 'incomplete';
run;

proc print data=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You could also use cmiss() or nmiss() instead of n() but not missing() because this function can only take one argument (variable).&lt;/P&gt;
&lt;P&gt;Here two ways using cmiss()&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  length take $10.;
/*  if cmiss(of score1-score3) = 0 then*/
  if cmiss(of score:) = 0 then
    take = 'complete';
  else take = 'incomplete';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the documentation &lt;A href="https://go.documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p06ybg84o0asa4n17l9ieauk58hb.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;here&lt;/A&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Comparisons&lt;BR /&gt;The MISSING function can have only one argument. The CMISS function can have multiple arguments and returns a count of the missing values. The NMISS function requires numeric arguments and returns the number of missing values in the list of arguments.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 29 Jun 2020 02:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Search-Missing-List/m-p/665674#M199078</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-06-29T02:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Search Missing List</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Search-Missing-List/m-p/665678#M199079</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;already gave you an excellent answer.&amp;nbsp; Just to elaborate on one point ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your original program, the value that you evaluated was score1-score3.&amp;nbsp; This is interpreted as score1 minus score3, which is why score2 played no role in the outcome.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 01:36:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Search-Missing-List/m-p/665678#M199079</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2020-06-29T01:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Search Missing List</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Search-Missing-List/m-p/665683#M199081</link>
      <description>&lt;P&gt;This portion is the issue:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;missing(score1-score3)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;score1-score3 is interpreted by SAS as score1-score3.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think instead you intended to do the following, but unfortunately that's also not valid for the MISSING() function.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;missing(of score1-score3)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So what you want instead is the NMISS() function which checks for missing or CMISS() for character variables.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if nmiss(of score1-score3)...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/331031"&gt;@skatethejake&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just trying to see if there is a way to search for missing characters within this list. When I output the data, take still comes out to be complete even if there is a missing value in score 2. I thought the syntax below but I guess missing() only returns for one variable because when I run the data the only one that will come out incomplete when there is a missing score is score 1. What do I have to do in order to just search multiple variables? I know the easy answer would just be to do an OR clause but let's assume there are tons of scores. would it really be necessary to right 20 different OR's?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data udemy.scoredata_all;&lt;BR /&gt;set udemy.score_data;&lt;BR /&gt;if not missing(score1-score3) then take = 'complete';&lt;BR /&gt;else take = 'incomplete';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jake&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 01:56:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Search-Missing-List/m-p/665683#M199081</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-06-29T01:56:05Z</dc:date>
    </item>
  </channel>
</rss>

