<?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: How to refer a long list of variables instead of typing individually? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-refer-a-long-list-of-variables-instead-of-typing/m-p/440257#M109942</link>
    <description>&lt;P&gt;It would help if you named your variables from the beginning to account for this need.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if n(of fruit_:) &amp;gt; 0 then flag='yes';&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 26 Feb 2018 17:13:14 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-02-26T17:13:14Z</dc:date>
    <item>
      <title>How to refer a long list of variables instead of typing individually?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-refer-a-long-list-of-variables-instead-of-typing/m-p/440230#M109931</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have many categories of variables and each of category include a lot of variables. I would like to create a statement that for each individual observation,&amp;nbsp; if there is at least one variable has non missing value, then we can use this observation. Now I only know the statement like below:&lt;/P&gt;&lt;P&gt;if apple ne . or banana ne . or&amp;nbsp; grape ne. then flag='yes';&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, since I have tons of variables in each category, it will be very time consuming to type them individually. I'm wondering if there is an efficient way to do it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate any thoughts and recommendations.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 16:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-refer-a-long-list-of-variables-instead-of-typing/m-p/440230#M109931</guid>
      <dc:creator>huhuhu</dc:creator>
      <dc:date>2018-02-26T16:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to refer a long list of variables instead of typing individually?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-refer-a-long-list-of-variables-instead-of-typing/m-p/440237#M109934</link>
      <description>&lt;P&gt;Use the N function to count the number of non missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;If n(of var1-var3) &amp;gt;=1 then do;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Feb 2018 16:25:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-refer-a-long-list-of-variables-instead-of-typing/m-p/440237#M109934</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-26T16:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to refer a long list of variables instead of typing individually?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-refer-a-long-list-of-variables-instead-of-typing/m-p/440241#M109936</link>
      <description>&lt;P&gt;Thank you for your recommendation! but they are not consecutive variables. They locate at random place in a large dataset.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 16:28:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-refer-a-long-list-of-variables-instead-of-typing/m-p/440241#M109936</guid>
      <dc:creator>huhuhu</dc:creator>
      <dc:date>2018-02-26T16:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to refer a long list of variables instead of typing individually?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-refer-a-long-list-of-variables-instead-of-typing/m-p/440253#M109941</link>
      <description>&lt;P&gt;If the variables you are concerned about are all numeric, you could use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if n(of _numeric_) &amp;gt; 0 then do;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 16:55:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-refer-a-long-list-of-variables-instead-of-typing/m-p/440253#M109941</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-02-26T16:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to refer a long list of variables instead of typing individually?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-refer-a-long-list-of-variables-instead-of-typing/m-p/440257#M109942</link>
      <description>&lt;P&gt;It would help if you named your variables from the beginning to account for this need.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if n(of fruit_:) &amp;gt; 0 then flag='yes';&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Feb 2018 17:13:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-refer-a-long-list-of-variables-instead-of-typing/m-p/440257#M109942</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-02-26T17:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to refer a long list of variables instead of typing individually?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-refer-a-long-list-of-variables-instead-of-typing/m-p/440262#M109945</link>
      <description>&lt;P&gt;If you don't have a naming convention or they're not placed sequentially then unfortunately you're stuck listing them all out.&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/79834"&gt;@huhuhu&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thank you for your recommendation! but they are not consecutive variables. They locate at random place in a large dataset.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 17:23:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-refer-a-long-list-of-variables-instead-of-typing/m-p/440262#M109945</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-26T17:23:10Z</dc:date>
    </item>
  </channel>
</rss>

