<?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: Help with running a SAS macro (no output is generated) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-with-running-a-SAS-macro-no-output-is-generated/m-p/744845#M233407</link>
    <description>&lt;P&gt;Please show your macro call and the log. Below, you've shown the macro code but no actual attempt to use it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use the macro I'd expect to see something like the following in your code (from header instructions)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%winsor(dsetin=mydata, vars=assets earnings, type=delete);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;LI-SPOILER&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1906"&gt;@finans_sas&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello Everyone:&lt;/P&gt;
&lt;P&gt;I am working with a SAS macro to winsorize my data (please see attached). The SAS macro is below. When I run the program, it appears to be running okay (no error is generated), however there is no output. Could you help me identify what might be the problem? I tried closing the SAS program and opening back again, but it did not help.&lt;/P&gt;
&lt;P&gt;Thank you so much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;&lt;A href="http://www.byuaccounting.net/mediawiki/images/5/51/WinsorizeMacro.txt" target="_blank" rel="noopener"&gt;http://www.byuaccounting.net/mediawiki/images/5/51/WinsorizeMacro.txt&lt;/A&gt;&lt;BR /&gt;Winsorize macro&lt;BR /&gt;Can winsorize or trim at specified percentiles;&lt;BR /&gt;dsetout = leave blank to overwrite dsetin&lt;BR /&gt;byvar = none for no byvar (trims/winsorizes pooled sample)&lt;BR /&gt;type = delete/winsor&lt;BR /&gt;ex: %winsor(dsetin=mydata, dsetout=mydata2, byvar=year, vars=assets earnings, pctl=0 98);&lt;BR /&gt;winsorizes by year at 98%, puts resulting dataset into mydata2&lt;/P&gt;
&lt;P&gt;%winsor(dsetin=mydata, vars=assets earnings, type=delete);&lt;BR /&gt;trims pooled sample at 1% and 99%, puts resulting dataset back into mydata&lt;BR /&gt;********************************************************************************/&lt;/P&gt;
&lt;P&gt;%macro winsor(dsetin=sasregrr, dsetout=aregrr, byvar=none, vars=equal, type=winsor, pctl=15 85);&lt;/P&gt;
&lt;P&gt;%if &amp;amp;dsetout = %then %let dsetout = &amp;amp;dsetin;&lt;BR /&gt;&lt;BR /&gt;%let varL=;&lt;BR /&gt;%let varH=;&lt;BR /&gt;%let xn=1;&lt;/P&gt;
&lt;P&gt;%do %until ( %scan(&amp;amp;vars,&amp;amp;xn)= );&lt;BR /&gt;%let token = %scan(&amp;amp;vars,&amp;amp;xn);&lt;BR /&gt;%let varL = &amp;amp;varL &amp;amp;token.L;&lt;BR /&gt;%let varH = &amp;amp;varH &amp;amp;token.H;&lt;BR /&gt;%let xn=%EVAL(&amp;amp;xn + 1);&lt;BR /&gt;%end;&lt;/P&gt;
&lt;P&gt;%let xn=%eval(&amp;amp;xn-1);&lt;/P&gt;
&lt;P&gt;data xtemp;&lt;BR /&gt;set &amp;amp;dsetin;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%let dropvar = ;&lt;BR /&gt;%if &amp;amp;byvar = none %then %do;&lt;/P&gt;
&lt;P&gt;data xtemp;&lt;BR /&gt;set xtemp;&lt;BR /&gt;xbyvar = 1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%let byvar = xbyvar;&lt;BR /&gt;%let dropvar = xbyvar;&lt;/P&gt;
&lt;P&gt;%end;&lt;/P&gt;
&lt;P&gt;proc sort data = xtemp;&lt;BR /&gt;by &amp;amp;byvar;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc univariate data = xtemp noprint;&lt;BR /&gt;by &amp;amp;byvar;&lt;BR /&gt;var &amp;amp;vars;&lt;BR /&gt;output out = xtemp_pctl PCTLPTS = &amp;amp;pctl PCTLPRE = &amp;amp;vars PCTLNAME = L H;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data &amp;amp;dsetout;&lt;BR /&gt;merge xtemp xtemp_pctl;&lt;BR /&gt;by &amp;amp;byvar;&lt;BR /&gt;array trimvars{&amp;amp;xn} &amp;amp;vars;&lt;BR /&gt;array trimvarl{&amp;amp;xn} &amp;amp;varL;&lt;BR /&gt;array trimvarh{&amp;amp;xn} &amp;amp;varH;&lt;/P&gt;
&lt;P&gt;do xi = 1 to dim(trimvars);&lt;/P&gt;
&lt;P&gt;%if &amp;amp;type = winsor %then %do;&lt;BR /&gt;if trimvars{xi} ne . then do;&lt;BR /&gt;if (trimvars{xi} &amp;lt; trimvarl{xi}) then trimvars{xi} = trimvarl{xi};&lt;BR /&gt;if (trimvars{xi} &amp;gt; trimvarh{xi}) then trimvars{xi} = trimvarh{xi};&lt;BR /&gt;end;&lt;BR /&gt;%end;&lt;/P&gt;
&lt;P&gt;%else %do;&lt;BR /&gt;if trimvars{xi} ne . then do;&lt;BR /&gt;if (trimvars{xi} &amp;lt; trimvarl{xi}) then delete;&lt;BR /&gt;if (trimvars{xi} &amp;gt; trimvarh{xi}) then delete;&lt;BR /&gt;end;&lt;BR /&gt;%end;&lt;/P&gt;
&lt;P&gt;end;&lt;BR /&gt;drop &amp;amp;varL &amp;amp;varH &amp;amp;dropvar xi;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;%mend winsor;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;/LI-SPOILER&gt;</description>
    <pubDate>Tue, 01 Jun 2021 02:34:19 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-06-01T02:34:19Z</dc:date>
    <item>
      <title>Help with running a SAS macro (no output is generated)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-running-a-SAS-macro-no-output-is-generated/m-p/744843#M233406</link>
      <description>&lt;P&gt;Hello Everyone:&lt;/P&gt;
&lt;P&gt;I am working with a SAS macro to winsorize my data (please see attached). The SAS macro is below. When I run the program, it appears to be running okay (no error is generated), however there is no output. Could you help me identify what might be the problem? I tried closing the SAS program and opening back again, but it did not help.&lt;/P&gt;
&lt;P&gt;Thank you so much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;&lt;A href="http://www.byuaccounting.net/mediawiki/images/5/51/WinsorizeMacro.txt" target="_blank"&gt;http://www.byuaccounting.net/mediawiki/images/5/51/WinsorizeMacro.txt&lt;/A&gt;&lt;BR /&gt;Winsorize macro&lt;BR /&gt;Can winsorize or trim at specified percentiles;&lt;BR /&gt;dsetout = leave blank to overwrite dsetin&lt;BR /&gt;byvar = none for no byvar (trims/winsorizes pooled sample)&lt;BR /&gt;type = delete/winsor&lt;BR /&gt;ex: %winsor(dsetin=mydata, dsetout=mydata2, byvar=year, vars=assets earnings, pctl=0 98);&lt;BR /&gt;winsorizes by year at 98%, puts resulting dataset into mydata2&lt;/P&gt;
&lt;P&gt;%winsor(dsetin=mydata, vars=assets earnings, type=delete);&lt;BR /&gt;trims pooled sample at 1% and 99%, puts resulting dataset back into mydata&lt;BR /&gt;********************************************************************************/&lt;/P&gt;
&lt;P&gt;%macro winsor(dsetin=sasregrr, dsetout=aregrr, byvar=none, vars=equal, type=winsor, pctl=15 85);&lt;/P&gt;
&lt;P&gt;%if &amp;amp;dsetout = %then %let dsetout = &amp;amp;dsetin;&lt;BR /&gt;&lt;BR /&gt;%let varL=;&lt;BR /&gt;%let varH=;&lt;BR /&gt;%let xn=1;&lt;/P&gt;
&lt;P&gt;%do %until ( %scan(&amp;amp;vars,&amp;amp;xn)= );&lt;BR /&gt;%let token = %scan(&amp;amp;vars,&amp;amp;xn);&lt;BR /&gt;%let varL = &amp;amp;varL &amp;amp;token.L;&lt;BR /&gt;%let varH = &amp;amp;varH &amp;amp;token.H;&lt;BR /&gt;%let xn=%EVAL(&amp;amp;xn + 1);&lt;BR /&gt;%end;&lt;/P&gt;
&lt;P&gt;%let xn=%eval(&amp;amp;xn-1);&lt;/P&gt;
&lt;P&gt;data xtemp;&lt;BR /&gt;set &amp;amp;dsetin;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%let dropvar = ;&lt;BR /&gt;%if &amp;amp;byvar = none %then %do;&lt;/P&gt;
&lt;P&gt;data xtemp;&lt;BR /&gt;set xtemp;&lt;BR /&gt;xbyvar = 1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%let byvar = xbyvar;&lt;BR /&gt;%let dropvar = xbyvar;&lt;/P&gt;
&lt;P&gt;%end;&lt;/P&gt;
&lt;P&gt;proc sort data = xtemp;&lt;BR /&gt;by &amp;amp;byvar;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc univariate data = xtemp noprint;&lt;BR /&gt;by &amp;amp;byvar;&lt;BR /&gt;var &amp;amp;vars;&lt;BR /&gt;output out = xtemp_pctl PCTLPTS = &amp;amp;pctl PCTLPRE = &amp;amp;vars PCTLNAME = L H;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data &amp;amp;dsetout;&lt;BR /&gt;merge xtemp xtemp_pctl;&lt;BR /&gt;by &amp;amp;byvar;&lt;BR /&gt;array trimvars{&amp;amp;xn} &amp;amp;vars;&lt;BR /&gt;array trimvarl{&amp;amp;xn} &amp;amp;varL;&lt;BR /&gt;array trimvarh{&amp;amp;xn} &amp;amp;varH;&lt;/P&gt;
&lt;P&gt;do xi = 1 to dim(trimvars);&lt;/P&gt;
&lt;P&gt;%if &amp;amp;type = winsor %then %do;&lt;BR /&gt;if trimvars{xi} ne . then do;&lt;BR /&gt;if (trimvars{xi} &amp;lt; trimvarl{xi}) then trimvars{xi} = trimvarl{xi};&lt;BR /&gt;if (trimvars{xi} &amp;gt; trimvarh{xi}) then trimvars{xi} = trimvarh{xi};&lt;BR /&gt;end;&lt;BR /&gt;%end;&lt;/P&gt;
&lt;P&gt;%else %do;&lt;BR /&gt;if trimvars{xi} ne . then do;&lt;BR /&gt;if (trimvars{xi} &amp;lt; trimvarl{xi}) then delete;&lt;BR /&gt;if (trimvars{xi} &amp;gt; trimvarh{xi}) then delete;&lt;BR /&gt;end;&lt;BR /&gt;%end;&lt;/P&gt;
&lt;P&gt;end;&lt;BR /&gt;drop &amp;amp;varL &amp;amp;varH &amp;amp;dropvar xi;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;%mend winsor;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 02:06:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-running-a-SAS-macro-no-output-is-generated/m-p/744843#M233406</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2021-06-01T02:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help with running a SAS macro (no output is generated)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-running-a-SAS-macro-no-output-is-generated/m-p/744845#M233407</link>
      <description>&lt;P&gt;Please show your macro call and the log. Below, you've shown the macro code but no actual attempt to use it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use the macro I'd expect to see something like the following in your code (from header instructions)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%winsor(dsetin=mydata, vars=assets earnings, type=delete);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;LI-SPOILER&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1906"&gt;@finans_sas&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello Everyone:&lt;/P&gt;
&lt;P&gt;I am working with a SAS macro to winsorize my data (please see attached). The SAS macro is below. When I run the program, it appears to be running okay (no error is generated), however there is no output. Could you help me identify what might be the problem? I tried closing the SAS program and opening back again, but it did not help.&lt;/P&gt;
&lt;P&gt;Thank you so much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*******************************************************************************&lt;BR /&gt;&lt;A href="http://www.byuaccounting.net/mediawiki/images/5/51/WinsorizeMacro.txt" target="_blank" rel="noopener"&gt;http://www.byuaccounting.net/mediawiki/images/5/51/WinsorizeMacro.txt&lt;/A&gt;&lt;BR /&gt;Winsorize macro&lt;BR /&gt;Can winsorize or trim at specified percentiles;&lt;BR /&gt;dsetout = leave blank to overwrite dsetin&lt;BR /&gt;byvar = none for no byvar (trims/winsorizes pooled sample)&lt;BR /&gt;type = delete/winsor&lt;BR /&gt;ex: %winsor(dsetin=mydata, dsetout=mydata2, byvar=year, vars=assets earnings, pctl=0 98);&lt;BR /&gt;winsorizes by year at 98%, puts resulting dataset into mydata2&lt;/P&gt;
&lt;P&gt;%winsor(dsetin=mydata, vars=assets earnings, type=delete);&lt;BR /&gt;trims pooled sample at 1% and 99%, puts resulting dataset back into mydata&lt;BR /&gt;********************************************************************************/&lt;/P&gt;
&lt;P&gt;%macro winsor(dsetin=sasregrr, dsetout=aregrr, byvar=none, vars=equal, type=winsor, pctl=15 85);&lt;/P&gt;
&lt;P&gt;%if &amp;amp;dsetout = %then %let dsetout = &amp;amp;dsetin;&lt;BR /&gt;&lt;BR /&gt;%let varL=;&lt;BR /&gt;%let varH=;&lt;BR /&gt;%let xn=1;&lt;/P&gt;
&lt;P&gt;%do %until ( %scan(&amp;amp;vars,&amp;amp;xn)= );&lt;BR /&gt;%let token = %scan(&amp;amp;vars,&amp;amp;xn);&lt;BR /&gt;%let varL = &amp;amp;varL &amp;amp;token.L;&lt;BR /&gt;%let varH = &amp;amp;varH &amp;amp;token.H;&lt;BR /&gt;%let xn=%EVAL(&amp;amp;xn + 1);&lt;BR /&gt;%end;&lt;/P&gt;
&lt;P&gt;%let xn=%eval(&amp;amp;xn-1);&lt;/P&gt;
&lt;P&gt;data xtemp;&lt;BR /&gt;set &amp;amp;dsetin;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%let dropvar = ;&lt;BR /&gt;%if &amp;amp;byvar = none %then %do;&lt;/P&gt;
&lt;P&gt;data xtemp;&lt;BR /&gt;set xtemp;&lt;BR /&gt;xbyvar = 1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%let byvar = xbyvar;&lt;BR /&gt;%let dropvar = xbyvar;&lt;/P&gt;
&lt;P&gt;%end;&lt;/P&gt;
&lt;P&gt;proc sort data = xtemp;&lt;BR /&gt;by &amp;amp;byvar;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc univariate data = xtemp noprint;&lt;BR /&gt;by &amp;amp;byvar;&lt;BR /&gt;var &amp;amp;vars;&lt;BR /&gt;output out = xtemp_pctl PCTLPTS = &amp;amp;pctl PCTLPRE = &amp;amp;vars PCTLNAME = L H;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data &amp;amp;dsetout;&lt;BR /&gt;merge xtemp xtemp_pctl;&lt;BR /&gt;by &amp;amp;byvar;&lt;BR /&gt;array trimvars{&amp;amp;xn} &amp;amp;vars;&lt;BR /&gt;array trimvarl{&amp;amp;xn} &amp;amp;varL;&lt;BR /&gt;array trimvarh{&amp;amp;xn} &amp;amp;varH;&lt;/P&gt;
&lt;P&gt;do xi = 1 to dim(trimvars);&lt;/P&gt;
&lt;P&gt;%if &amp;amp;type = winsor %then %do;&lt;BR /&gt;if trimvars{xi} ne . then do;&lt;BR /&gt;if (trimvars{xi} &amp;lt; trimvarl{xi}) then trimvars{xi} = trimvarl{xi};&lt;BR /&gt;if (trimvars{xi} &amp;gt; trimvarh{xi}) then trimvars{xi} = trimvarh{xi};&lt;BR /&gt;end;&lt;BR /&gt;%end;&lt;/P&gt;
&lt;P&gt;%else %do;&lt;BR /&gt;if trimvars{xi} ne . then do;&lt;BR /&gt;if (trimvars{xi} &amp;lt; trimvarl{xi}) then delete;&lt;BR /&gt;if (trimvars{xi} &amp;gt; trimvarh{xi}) then delete;&lt;BR /&gt;end;&lt;BR /&gt;%end;&lt;/P&gt;
&lt;P&gt;end;&lt;BR /&gt;drop &amp;amp;varL &amp;amp;varH &amp;amp;dropvar xi;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;%mend winsor;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;/LI-SPOILER&gt;</description>
      <pubDate>Tue, 01 Jun 2021 02:34:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-running-a-SAS-macro-no-output-is-generated/m-p/744845#M233407</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-06-01T02:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help with running a SAS macro (no output is generated)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-running-a-SAS-macro-no-output-is-generated/m-p/744851#M233409</link>
      <description>&lt;P&gt;Thank you so much &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; for your quick reply. I copied and pasted what I saw on the log (I am so sorry for all these numbers showing up on the left). Please let me know if I can provide any further information. I also attached the SAS program file to this reply.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4652 &lt;STRONG&gt;%macro&lt;/STRONG&gt; winsor(dsetin=sasregrr, dsetout=aregrr, byvar=none, vars=equal, type=winsor, pctl=15&lt;BR /&gt;4652! 85);&lt;BR /&gt;4653&lt;BR /&gt;4654 %if &amp;amp;dsetout = %then %let dsetout = &amp;amp;dsetin;&lt;BR /&gt;4655&lt;BR /&gt;4656 %let varL=;&lt;BR /&gt;4657 %let varH=;&lt;BR /&gt;4658 %let xn=1;&lt;BR /&gt;4659&lt;BR /&gt;4660 %do %until ( %scan(&amp;amp;vars,&amp;amp;xn)= );&lt;BR /&gt;4661 %let token = %scan(&amp;amp;vars,&amp;amp;xn);&lt;BR /&gt;4662 %let varL = &amp;amp;varL &amp;amp;token.L;&lt;BR /&gt;4663 %let varH = &amp;amp;varH &amp;amp;token.H;&lt;BR /&gt;4664 %let xn=%EVAL(&amp;amp;xn + 1);&lt;BR /&gt;4665 %end;&lt;BR /&gt;4666&lt;BR /&gt;4667 %let xn=%eval(&amp;amp;xn-1);&lt;BR /&gt;4668&lt;BR /&gt;4669 data xtemp;&lt;BR /&gt;4670 set &amp;amp;dsetin;&lt;BR /&gt;4671 run;&lt;BR /&gt;4672&lt;BR /&gt;4673 %let dropvar = ;&lt;BR /&gt;4674 %if &amp;amp;byvar = none %then %do;&lt;BR /&gt;4675&lt;BR /&gt;4676 data xtemp;&lt;BR /&gt;4677 set xtemp;&lt;BR /&gt;4678 xbyvar = 1;&lt;BR /&gt;4679 run;&lt;BR /&gt;4680&lt;BR /&gt;4681 %let byvar = xbyvar;&lt;BR /&gt;4682 %let dropvar = xbyvar;&lt;BR /&gt;4683&lt;BR /&gt;4684 %end;&lt;BR /&gt;4685&lt;BR /&gt;4686 proc sort data = xtemp;&lt;BR /&gt;4687 by &amp;amp;byvar;&lt;BR /&gt;4688 run;&lt;BR /&gt;4689&lt;BR /&gt;4690 proc univariate data = xtemp noprint;&lt;BR /&gt;4691 by &amp;amp;byvar;&lt;BR /&gt;4692 var &amp;amp;vars;&lt;BR /&gt;4693 output out = xtemp_pctl PCTLPTS = &amp;amp;pctl PCTLPRE = &amp;amp;vars PCTLNAME = L H;&lt;BR /&gt;4694 run;&lt;BR /&gt;4695&lt;BR /&gt;4696 data &amp;amp;dsetout;&lt;BR /&gt;4697 merge xtemp xtemp_pctl;&lt;BR /&gt;4698 by &amp;amp;byvar;&lt;BR /&gt;4699 array trimvars{&amp;amp;xn} &amp;amp;vars;&lt;BR /&gt;4700 array trimvarl{&amp;amp;xn} &amp;amp;varL;&lt;BR /&gt;4701 array trimvarh{&amp;amp;xn} &amp;amp;varH;&lt;BR /&gt;4702&lt;BR /&gt;4703 do xi = 1 to dim(trimvars);&lt;BR /&gt;4704&lt;BR /&gt;4705 %if &amp;amp;type = winsor %then %do;&lt;BR /&gt;4706 if trimvars{xi} ne . then do;&lt;BR /&gt;4707 if (trimvars{xi} &amp;lt; trimvarl{xi}) then trimvars{xi} = trimvarl{xi};&lt;BR /&gt;4708 if (trimvars{xi} &amp;gt; trimvarh{xi}) then trimvars{xi} = trimvarh{xi};&lt;BR /&gt;4709 end;&lt;BR /&gt;4710 %end;&lt;BR /&gt;4711&lt;BR /&gt;4712 %else %do;&lt;BR /&gt;4713 if trimvars{xi} ne . then do;&lt;BR /&gt;4714 if (trimvars{xi} &amp;lt; trimvarl{xi}) then delete;&lt;BR /&gt;4715 if (trimvars{xi} &amp;gt; trimvarh{xi}) then delete;&lt;BR /&gt;4716 end;&lt;BR /&gt;4717 %end;&lt;BR /&gt;4718&lt;BR /&gt;4719 end;&lt;BR /&gt;4720 drop &amp;amp;varL &amp;amp;varH &amp;amp;dropvar xi;&lt;BR /&gt;4721 run;&lt;BR /&gt;4722&lt;BR /&gt;4723&lt;BR /&gt;4724 &lt;STRONG&gt;%mend winsor;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 03:12:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-running-a-SAS-macro-no-output-is-generated/m-p/744851#M233409</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2021-06-01T03:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help with running a SAS macro (no output is generated)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-running-a-SAS-macro-no-output-is-generated/m-p/744853#M233411</link>
      <description>&lt;P&gt;Well, you still never called the macro. Did you read the instructions at the top of the program? You don't put the parameters in the %MACRO statement, you put them in a call after the macro definition. &lt;BR /&gt;&lt;BR /&gt;Here's a different example. Make sure you use the original macro code not your modified %macro statement. &lt;BR /&gt;&lt;BR /&gt;Macro definition (portion of code you have shown)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro print(dsn=);
proc print data=&amp;amp;dsn.;
run;
%mend;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Macro call/execution - THE PART YOU'RE MISSING:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%print(sashelp.class);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 14:21:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-running-a-SAS-macro-no-output-is-generated/m-p/744853#M233411</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-06-01T14:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with running a SAS macro (no output is generated)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-running-a-SAS-macro-no-output-is-generated/m-p/751062#M236362</link>
      <description>Thank you so much, Reeza!</description>
      <pubDate>Tue, 29 Jun 2021 20:45:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-running-a-SAS-macro-no-output-is-generated/m-p/751062#M236362</guid>
      <dc:creator>finans_sas</dc:creator>
      <dc:date>2021-06-29T20:45:09Z</dc:date>
    </item>
  </channel>
</rss>

