title: SAS - What is a good way to check if any of the variables in a list is missing
body: <p>I have datasets where I sometimes need to select observations where none of the variables in the list are missing.</p>
  
  <p>i.e I have to do this.</p>
  
  <pre><code>Where E1 NE . and E2 NE . and E3 NE .
  </code></pre>
  
  <p>or I can do it little bit more easily like this:</p>
  
  <pre><code>Where E1+E2+E3 NE .
  </code></pre>
  
  <p><strong>But is there any way in SAS to do something like:</strong></p>
  
  <pre><code>Where not missing(E1 - E3)
  </code></pre>
  
  <hr>
  
  <p>It doesn't work if I do</p>
  
  <pre><code>where sum(of E1-E3) NE .
  </code></pre>
  
  <p>Because that is equivalent to</p>
  
  <pre><code>Where E1 NE . or E2 NE . or E3 NE .
  </code></pre>
  
  <p>But  i need "and" instead of "or".</p>
  
  <hr>
  
  <p>I could also loop over  those variables in a dataset and build a variable for the selection like:</p>
  
  <pre><code>array E E1-E3;
  misind = 0;
  do i=1 to dim(E);
      if E(i) = . then misind = 1;
  end;
  </code></pre>
  
  <p>But that's not so simple either!</p>