<?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: proc and subsetting in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/906150#M357828</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/428110"&gt;@current_thing&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I read on this forum that &lt;STRONG&gt;IF&lt;/STRONG&gt; and &lt;STRONG&gt;WHERE&lt;/STRONG&gt; statements can be used in Data step, but in proc steps only &lt;STRONG&gt;IF&lt;/STRONG&gt; can be used. I've tried it and in &lt;STRONG&gt;proc means&lt;/STRONG&gt;, for example, &lt;STRONG&gt;if&lt;/STRONG&gt; can't be used but &lt;STRONG&gt;where&lt;/STRONG&gt; can. Is this true for all proc steps? Thanks!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Post a link to the post that says "but in proc steps only &lt;STRONG&gt;IF&lt;/STRONG&gt; can be used."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will hope that you are not confusing the macro language %if with the data step if as they serve two quite different roles. There is no macro language "%where" provided by SAS (I won't say that someone hasn't written a macro function with that name) so is a possible source of confusion for those that haven't become familiar enough with SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Dec 2023 17:42:43 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-12-08T17:42:43Z</dc:date>
    <item>
      <title>proc and subsetting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/906129#M357818</link>
      <description>&lt;P&gt;I read on this forum that &lt;STRONG&gt;IF&lt;/STRONG&gt; and &lt;STRONG&gt;WHERE&lt;/STRONG&gt; statements can be used in Data step, but in proc steps only &lt;STRONG&gt;IF&lt;/STRONG&gt; can be used. I've tried it and in &lt;STRONG&gt;proc means&lt;/STRONG&gt;, for example, &lt;STRONG&gt;if&lt;/STRONG&gt; can't be used but &lt;STRONG&gt;where&lt;/STRONG&gt; can. Is this true for all proc steps? Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 21:30:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/906129#M357818</guid>
      <dc:creator>current_thing</dc:creator>
      <dc:date>2023-12-04T21:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: proc and subsetting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/906130#M357819</link>
      <description>&lt;P&gt;Show the code. And log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 21:33:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/906130#M357819</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-12-04T21:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: proc and subsetting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/906131#M357820</link>
      <description>&lt;P&gt;In PROC (PROCEDURE) steps, only WHERE can be used!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are very few PROCs that allow for (data-step-like) programming statements (NLIN, NLMIXED, MCMC, MODEL, REPORT, ...). In these PROCs you can also use "IF", but in the big majority of PROCS no "IF" is allowed, only "WHERE".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 21:36:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/906131#M357820</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-12-04T21:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: proc and subsetting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/906133#M357821</link>
      <description>&lt;P&gt;WHERE is what is used in PROCs, IF is primarily data steps and some select procedures that allow for data manipulation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 21:49:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/906133#M357821</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-12-04T21:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: proc and subsetting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/906136#M357822</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;I read on this forum that &lt;STRONG&gt;IF&lt;/STRONG&gt; and &lt;STRONG&gt;WHERE&lt;/STRONG&gt; statements can be used in Data step&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;But the two statements, IF and WHERE, are not completely interchangeable, there are times when only IF will work and vice versa.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lestmtsref/p1cxl8ifdt8u0gn12wqbji8o5fq1.htm#p08fp02gyb04apn1fmq0a6cu3ynd" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lestmtsref/p1cxl8ifdt8u0gn12wqbji8o5fq1.htm#p08fp02gyb04apn1fmq0a6cu3ynd&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;but in proc steps only &lt;STRONG&gt;IF&lt;/STRONG&gt; can be used&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As others have pointed out, most PROCs only allow WHERE and do not allow IF (there are a few exceptions).&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 21:58:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/906136#M357822</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-12-04T21:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: proc and subsetting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/906150#M357828</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/428110"&gt;@current_thing&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I read on this forum that &lt;STRONG&gt;IF&lt;/STRONG&gt; and &lt;STRONG&gt;WHERE&lt;/STRONG&gt; statements can be used in Data step, but in proc steps only &lt;STRONG&gt;IF&lt;/STRONG&gt; can be used. I've tried it and in &lt;STRONG&gt;proc means&lt;/STRONG&gt;, for example, &lt;STRONG&gt;if&lt;/STRONG&gt; can't be used but &lt;STRONG&gt;where&lt;/STRONG&gt; can. Is this true for all proc steps? Thanks!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Post a link to the post that says "but in proc steps only &lt;STRONG&gt;IF&lt;/STRONG&gt; can be used."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will hope that you are not confusing the macro language %if with the data step if as they serve two quite different roles. There is no macro language "%where" provided by SAS (I won't say that someone hasn't written a macro function with that name) so is a possible source of confusion for those that haven't become familiar enough with SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 17:42:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/906150#M357828</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-12-08T17:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: proc and subsetting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/907024#M358098</link>
      <description>&lt;P&gt;Yikes, I misread it. I went back to this forum and it actually said the reverse of what I put in the post &lt;span class="lia-unicode-emoji" title=":face_with_rolling_eyes:"&gt;🙄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 16:51:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-and-subsetting/m-p/907024#M358098</guid>
      <dc:creator>current_thing</dc:creator>
      <dc:date>2023-12-08T16:51:43Z</dc:date>
    </item>
  </channel>
</rss>

