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:
%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=&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(&systems,1,|);
proc sgplot data=user.tempcpu;
where system="&sys";
title "&type cpu use for &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 &nsystems;
%let sys=%scan(&systems,&i,|);
proc sgplot data=user.tempcpu;
where system="&sys";
title "&sys cpu use for &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;
Also if anyone has any better suggestions please let them fly. The landscaping option doesn't seem to be working either.
... View more