<?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: Loop through all variables in the proc step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-my-variables-Loop-through-all-variables-in-the-proc/m-p/712551#M219706</link>
    <description>&lt;LI-CODE lang="sas"&gt;&amp;amp;let number_of_sampled_var=%let sample_variable =array {&amp;amp;number_of_sampled_var} X1,X3, ...Xn; */Here i want a put this list of variables */proc means data=test_statistic noprint;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm sorry but I cannot understand your code. What do you think it is doing and what do you want it to be doing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a macro here that caps outliers, which seems similar to what you're trying to do here.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/31316a678433a1db8136" target="_blank"&gt;https://gist.github.com/statgeek/31316a678433a1db8136&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jan 2021 23:21:41 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-01-19T23:21:41Z</dc:date>
    <item>
      <title>How to keep my variables, Loop through all variables in the proc step separatly.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-my-variables-Loop-through-all-variables-in-the-proc/m-p/712545#M219701</link>
      <description>&lt;P&gt;Hello. I want to keep my variables, loop&amp;nbsp;through all variables in the proc step separatly.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;I have a large data set.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;For simplicity let's say he is infinite.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;I have created a list of variables that I want to work with.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;For example:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input X1 X2 X3 ...Xn;
cards;
1 2 3
4 5 6
7 8 9
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Generally i want use PROC STEP in each variable separately.&lt;/P&gt;&lt;P&gt;I choosed next variables X1, X3 and Xn (i dont know how to store this variable). And I want to do the next operations but macro:&lt;/P&gt;&lt;PRE&gt;&lt;FONT face="Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace" color="#000000"&gt;proc mean data=test noprint; &lt;BR /&gt;var x1;&lt;BR /&gt;output out=test_x1 mean= /autoname;&lt;BR /&gt;run;&lt;BR /&gt;proc mean data=test noprint; &lt;BR /&gt;var x3;&lt;BR /&gt;output out=test_x3 mean= /autoname;&lt;BR /&gt;run;&lt;BR /&gt;proc mean data=test noprint; &lt;BR /&gt;var xn;&lt;BR /&gt;output out=test_xn mean= /autoname;&lt;BR /&gt;run;&lt;BR /&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;Also i can use _ALL_ but it's impossible, because dataset is "infinity".&lt;/P&gt;&lt;P&gt;Thanks in advance for any hint :).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 23:54:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-keep-my-variables-Loop-through-all-variables-in-the-proc/m-p/712545#M219701</guid>
      <dc:creator>x3d1m4</dc:creator>
      <dc:date>2021-01-19T23:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through all variables in the proc step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-my-variables-Loop-through-all-variables-in-the-proc/m-p/712550#M219705</link>
      <description>&lt;P&gt;You might be better off actually describing in words what is supposed to happen instead of showing code that does not work.&lt;/P&gt;
&lt;P&gt;Better would be to show code that does work that does not use any macro code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 23:19:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-keep-my-variables-Loop-through-all-variables-in-the-proc/m-p/712550#M219705</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-01-19T23:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through all variables in the proc step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-my-variables-Loop-through-all-variables-in-the-proc/m-p/712551#M219706</link>
      <description>&lt;LI-CODE lang="sas"&gt;&amp;amp;let number_of_sampled_var=%let sample_variable =array {&amp;amp;number_of_sampled_var} X1,X3, ...Xn; */Here i want a put this list of variables */proc means data=test_statistic noprint;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm sorry but I cannot understand your code. What do you think it is doing and what do you want it to be doing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a macro here that caps outliers, which seems similar to what you're trying to do here.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/31316a678433a1db8136" target="_blank"&gt;https://gist.github.com/statgeek/31316a678433a1db8136&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 23:21:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-keep-my-variables-Loop-through-all-variables-in-the-proc/m-p/712551#M219706</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-01-19T23:21:41Z</dc:date>
    </item>
  </channel>
</rss>

