<?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: SAS Macro is not running in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-is-not-running/m-p/727517#M226301</link>
    <description>I don't see you calling it anywhere....I'd expect to see something like below, not knowing what the parameters should be obviously. &lt;BR /&gt;If you do have that and it doesn't run, please run it with the macro debugging options on (MPRINT, SYMBOLGEN) and include the log.&lt;BR /&gt;&lt;BR /&gt;%graph_cpu(8, 20);</description>
    <pubDate>Thu, 18 Mar 2021 18:46:31 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-03-18T18:46:31Z</dc:date>
    <item>
      <title>SAS Macro is not running</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-is-not-running/m-p/727514#M226298</link>
      <description>&lt;P&gt;I'm not the sharpest SAS programmer. My SAS macro in this statement doesn't seem to be running, or at least is not getting put to the pdf. I don't see anything in the SASLOG referencing the macro as well:&lt;/P&gt;
&lt;PRE&gt;%let rptdate =                                                 
 %sysfunc(intnx(day,%sysfunc(today()), -1),weekdate29.);       
                                                               
proc sql noprint;                                              
 select distinct cpcfname into :type from pdb.rmfintrv;        
quit;                                                          
                                                               
proc sql noprint;                                              
 select distinct system into :systems separated by '|'         
  from pdb.rmfintrv;                                           
 %let nsystems=&amp;amp;sqlobs;                                        
quit;                                                          
                                                               
proc sql;                                                      
 create table user.tempcpu as                                  
 select sysplex label='sysplex',                               
        system label='system',                                 
        hour,                                                  
        min(pctcpuby) as mincpu,                               
        avg(pctcpuby) as avgcpu,                               
        max(pctcpuby) as maxcpu,                               
        min(pctzipby) as minzip,                               
        avg(pctzipby) as avgzip,                               
        max(pctzipby) as maxzip,                               
        min(platbusy) as minplat,                              
        avg(platbusy) as avgplat,                              
        max(platbusy) as maxplat                               
   from pdb.rmfintrv                                           
  group by sysplex, system, hour;                              
                                                               
ods _all_ close;                                               
ods pdf file="/nitc/perf/test/nfccpu.pdf" style=sasweb notoc;  
options leftmargin=.5in rightmargin=.5in orientation=landscape;
                                                            
%let sys=%scan(&amp;amp;systems,1,|);                               
proc sgplot data=user.tempcpu;                              
 where system="&amp;amp;sys";                                       
 title "&amp;amp;type cpu use for &amp;amp;rptdate";                        
  vbar hour / response=maxplat datalabel transparency=0.3   
       legendlabel='max cpu';                               
  vbar hour / response=avgplat datalabel transparency=0.3   
       legendlabel='average cpu';                           
 xaxis label='hour';                                        
 yaxis label='cpu percentage';                              
run;                                                        
                                                            
%macro graph_cpu(nsystems,systems);                         
 %do i=1 %to &amp;amp;nsystems;                                     
  %let sys=%scan(&amp;amp;systems,&amp;amp;i,|);                            
                                                            
   proc sgplot data=user.tempcpu;                           
     where system="&amp;amp;sys";                                   
     title "&amp;amp;sys cpu use for &amp;amp;rptdate";                     
      vbar hour / response=maxcpu datalabel transparency=0.3
           legendlabel='max cpu';                           
      vbar hour / response=avgcpu datalabel transparency=0.3
           legendlabel='average cpu';                       
     vline hour / response=avgzip y2axis                    
           lineattrs=(thickness=2 pattern=solid)            
           legendlabel='average ziip';                      
     xaxis  label='hour';                                   
     yaxis label='cpu percentage';                          
     y2axis label='avg ziip percentage';                    
   run;                                                     
                                                            
 %end;                                                      
%mend graph_cpu;                                            
run;                         
              
ods pdf close;
run;                                         &lt;/PRE&gt;
&lt;P&gt;Also if anyone has any better suggestions please let them fly. The landscaping option doesn't seem to be working either.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 19:03:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-is-not-running/m-p/727514#M226298</guid>
      <dc:creator>G_I_Jeff</dc:creator>
      <dc:date>2021-03-18T19:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro is not running</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-is-not-running/m-p/727517#M226301</link>
      <description>I don't see you calling it anywhere....I'd expect to see something like below, not knowing what the parameters should be obviously. &lt;BR /&gt;If you do have that and it doesn't run, please run it with the macro debugging options on (MPRINT, SYMBOLGEN) and include the log.&lt;BR /&gt;&lt;BR /&gt;%graph_cpu(8, 20);</description>
      <pubDate>Thu, 18 Mar 2021 18:46:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-is-not-running/m-p/727517#M226301</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-03-18T18:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro is not running</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-is-not-running/m-p/727557#M226313</link>
      <description>&lt;P&gt;An awful lot things that you code like this:&lt;/P&gt;
&lt;PRE&gt; %do i=1 %to &amp;amp;nsystems;                                     
  %let sys=%scan(&amp;amp;systems,&amp;amp;i,|);                            
                                                            
   proc sgplot data=user.tempcpu;                           
     where system="&amp;amp;sys";     &lt;/PRE&gt;
&lt;P&gt;Could be done by&lt;/P&gt;
&lt;PRE&gt;Proc sgplot data=user.tempcpu;
   by system;
&lt;/PRE&gt;
&lt;P&gt;If you are subsetting data on the same variable you could something like&lt;/P&gt;
&lt;PRE&gt;where system in ("value1" "value2" "value5");&lt;/PRE&gt;
&lt;P&gt;though the data would need to be sorted by the By variable(s) as usual.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 20:25:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-is-not-running/m-p/727557#M226313</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-18T20:25:46Z</dc:date>
    </item>
  </channel>
</rss>

