how to build tabular dashboards using proc report shana bereznay acs raff rushton ibm frank bereznay...

32
How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Upload: chloe-mcdowell

Post on 24-Dec-2015

222 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

How to Build Tabular Dashboards Using Proc Report

Shana BereznayACS

Raff Rushton IBM

Frank BereznayIBM

Page 2: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

AgendaManagement ReportingDashboard OrganizationHow to Build

◦Two PhasesRelated Reporting

◦How to AutomateEmail NotificationSummary / Questions

Page 3: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Management ReportingA very key point…

◦There is no single right wayBeauty is in the eye of the

beholder◦Tabular vs Graphical Representation

Page 4: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

A Tabular View of Some Data

CEC Model Date

Avg CPU Busy

CPU Busy STD

90th Percentile

CPU Busy

Avg ZIP

Busy

ZIP Busy Std

90th Percentile ZIP Busy

CEC MIPS

ZIP MIPS

Avg GP

MIPS

90th Percentile GP MIPS

Mthly 3rd Highest MIPS

Demand

Mthly 3rd Highest MIPS Total

Delta Demand

Delta Total

CEC2 2094-722 01-31 MAY10 75 10.2 89 31 17.2 55 8,891 593 6,668 7,913 8,094 8,941 181 1,0282094-722 01-18 JUN10 73 11.1 87 36 20.4 65 8,891 593 6,490 7,735

GP Ratio 2097-714 19-30 JUN10 67 11.1 81 17 12.7 41 9,355 902 6,268 7,578 8,383 9,123 805 1,5451.05 2097-714 01-31 JUL10 64 12.3 82 18 14.3 40 9,355 902 5,987 7,671 8,608 9,500 937 1,829

Tot Ratio 2097-714 01-31 AUG10 69 11.2 84 25 17.2 53 9,355 902 6,455 7,858 8,133 8,785 275 9271.08 2097-714 01-30 SEP10 70 11.8 86 28 22.2 55 9,355 902 6,549 8,045 8,430 9,184 385 1,139

CEC3 2094-724 01-31 MAY10 47 9.6 59 98 5.9 100 9,527 1,779 4,478 5,621 6,300 6,652 679 1,031 2094-724 01-30 JUN10 40 7.6 50 93 9.9 100 9,527 1,779 3,811 4,764 5,167 5,734 404 971GP Ratio 2094-724 01-31 JUL10 44 9.2 56 93 8.3 100 9,527 1,779 4,192 5,335 5,537 6,249 202 914

0.81 2094-724 01-06 AUG10 44 8.5 54 93 8.1 99 9,527 1,779 4,192 5,145Tot Ratio 2097-711 07-31 AUG10 62 11.6 77 69 12.5 86 7,691 2,706 4,768 5,922 6,279 6,712 357 790

0.92 2097-711 01-30 SEP10 65 10.1 78 74 14 93 7,691 2,706 4,999 5,999 6,172 6,786 173 787

SYS1 2094-719 01-31 MAY10 56 10.5 69 27 12 44 7,917 593 4,434 5,463 5,663 5,910 200 447 2094-719 01-30 JUN10 57 9.6 69 22 8 28 7,917 593 4,513 5,463 5,835 6,091 372 628GP Ratio 2094-719 01-31 JUL10 56 10.1 68 20 5.3 27 7,917 593 4,434 5,384 5,653 5,993 269 609

0.97 2094-719 01-13 AUG10 55 9.7 66 17 5 24 7,917 593 4,354 5,225Tot Ratio 2097-711 14-31 AUG10 62 10.5 75 12 3.3 16 7,691 902 4,768 5,768 5,620 5,914 -148 146

1.01 2097-711 01-30 SEP10 65 11.2 78 14 3.8 20 7,691 902 4,999 5,999 6,032 6,306 33 307

SYS4 2094-718 01-31 MAY10 46 11.5 62 36 17.2 64 7,587 593 3,490 4,704 5,738 5,957 1,034 1,253 2094-718 01-30 JUN10 50 11.9 66 36 21.3 69 7,587 593 3,794 5,007 6,356 6,579 1,349 1,572GP Ratio 2094-718 01-16 J UL10 57 13 74 38 14.9 63 7,587 593 4,325 5,614

0.94 2097-710 17-31 JUL10 52 9.4 67 24 6.9 35 7,105 902 3,695 4,760 7,250 7,413 2,490 2,653Tot Ratio 2097-710 01-31 AUG10 54 10.3 68 22 5.6 29 7,105 902 3,837 4,831 5,485 5,678 654 847

0.98 2097-710 01-30 SEP10 57 10 69 23 6.4 30 7,105 902 4,050 4,902 5,714 5,945 812 1,043

Page 5: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

A Graphical View of the Same Data

CEC22094-722 (8,895 GP MIPS) to 2097-714 (9,355 GP MIPS)

Capacity Ratio 1.05

7,913 7,735 7,578 7,671 7,858 8,045

326 385 370 361478 496

0

1,000

2,000

3,000

4,000

5,000

6,000

7,000

8,000

9,000

01-31 MAY1001-18 JUN10 19-30 JUN10 01-31 JUL1001-31 AUG1001-30 SEP10

MIP

S

0

10

20

30

40

50

60

70

80

90

100

% C

PU

Bu

sy

90th Percentile GP MIPS 90th Percentile ZIP MIPS

90th Percentile CPU Busy 90th Percentile ZIP Busy

CEC32094-724 (11,306 Total MIPS) to 2097-711 (10,397 Total MIPS)

ZIP Capacity Included in Total MIPSCapacity Ratio .93

5,6214,764

5,335 5,1455,922 5,999

1,779

1,7791,779 1,761

2,327 2,517

0

1,000

2,000

3,000

4,000

5,000

6,000

7,000

8,000

9,000

01-31 MAY1001-30 JUN10 01-31 JUL1001-06 AUG1007-31 AUG1001-30 SEP10

MIP

S

0

10

20

30

40

50

60

70

80

90

100

%C

PU

Bu

sy

90th Percentile GP MIPS 90th Percentile ZIP MIPS

90th Percentile CPU Busy 90th Percentile ZIP Busy

SYS12094-719 (7,917 GP MIPS) to 2097-711 (7,691 GP MIPS)

Capacity Ratio .94

5,463 5,463 5,384 5,2255,768 5,999

261 166 160 142144 180

0

1,000

2,000

3,000

4,000

5,000

6,000

7,000

8,000

9,000

01-31 MAY1001-30 JUN10 01-31 JUL1001-13 AUG1014-31 AUG1001-30 SEP10

MIP

S

0

10

20

30

40

50

60

70

80

90

100%

CP

U B

us

y

90th Percentile GP MIPS 90th Percentile ZIP MIPS

90th Percentile CPU Busy 90th Percentile ZIP Busy

SYS42094-718 (7,587 GP MIPS) to 2097-710 (7,105 GP MIPS)

Capacity Ratio .94

4,704 5,0075,614

4,760 4,831 4,902

380409

374

316 262 271

0

1,000

2,000

3,000

4,000

5,000

6,000

7,000

8,000

9,000

01-31 MAY1001-30 JUN1001-16 J UL1017-31 JUL1001-31 AUG1001-30 SEP10

MIP

S

0

10

20

30

40

50

60

70

80

90

100

% C

PU

Bu

sy

90th Percentile GP MIPS 90th Percentile ZIP MIPS

90th Percentile CPU Busy 90th Percentile ZIP Busy

Page 6: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Management ReportingA very key point…

◦There is no single right wayBeauty is in the eye of the

beholder◦Tabular vs Graphical Representation

Some Common Themes◦Time Series Data Analysis◦Drill Down Capability◦Threshold based Exception Alerting◦Do Something if you see a ‘problem’

Page 7: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Dashboard Organization

Page 8: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

How to BuildPhase I

◦Create Unattributed Dashboard Design Dashboard Code Proc Report Statements

Phase II◦Attribute Cells

Add links to related reporting Add format to color cell background

Page 9: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Phase IDesign

Group1 - Environment CI-Name - zVM Instance Resource Date / Metric (Display 30 Days)

Prod, Test, Sand_Box (No Drill Down) LPAR Name (No Drill down)

CPU, Paging, DASD Response Time (Drill down to 30 day trend graph - Box and Wiskers plot format)

90th Percentile for Resource (Drill down to hourly plots)

Paging Rate Thresholds 00 - 05 - Blue CPU Utilization Thresholds 00 - 30 - BlueEmail Sys Admin on Yellow 05 - 15 - Green Email Sys Admin on Yellow 30 - 65 - Green

15 - 30 - Yellow 65 - 85 - YellowGreater than 30 - Red Greater than 85 - Red

DASD Response Time 00 - 10 - GreenEmail Sys Admin on Yellow 10 - 20 - Yellow

Greater than 20 - Red

Programming Notes

Page 10: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Example 1 – SAS Code

LibName VelSoft "&Path\VelSoft";ODS Html File="&Path\VelSoft\Example_1.html" Style=Statistical;ODS Listing Close;ODS Html;

Proc Report Data=VelSoft.XAMCPUBY NoWindows; Column Serial Startime CPUUtil; Define Serial /'Serial' Group; Define Startime /'Date' Group Format=Datetime7.; Define CPUUtil /'Mean Busy' Analysis Mean Format=4.1;Where DatePart(Startime) Between '01Mar10'd and '05Mar10'd and Serial In ('04E910','05D3A0');Title1 "Proc Report Example 1 – List of Data with Average Calculated";Title2 "Reporting on two zVM Instances to Save Space";Run;

ODS Html Close;ODS Listing;

Page 11: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Example 1- Output

Page 12: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Example 2 – SAS Code

LibName VelSoft "&Path\VelSoft";

Data XAMCPUBY; Set VelSoft.XAMCPUBY; LPAR = Serial; Env = Serial; Cat = 'CPU';

ODS Html File="&path\VelSoft\Example_2.html" Style=Statistical;ODS Listing Close;ODS Html;

Proc Report Data=XAMCPUBY NoWindows; Column Env LPAR Cat Startime, CPUUtil; Define Env / '' Group Format=$Env.; Define LPAR / '' Group Format=$LPAR.; Define Cat / '' Group Format=$Cat.; Define Startime / '' Across Format=Datetime7.; Define CPUUtil / '' Analysis Format=4.1 Mean Width=7;Where DatePart(Startime) Between '01Mar10'd and '05Mar10'd;Title1 "Proc Report Example 2 - Use of the Across Parameter and Grouping Variables”;Run;

ODS HTML Close;ODS Listing;

Page 13: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Example 2 - Output

Page 14: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Example 3 – SAS CodeLibName VelSoft "&Path\VelSoft";

Data XAMCPUBY; Set VelSoft.XAMCPUBY; LPAR = Serial; Env = Serial; Cat = 'CPU';

ODS Html File="&path\VelSoft\Example_3.html" Style=Statistical;ODS Listing Close;ODS Html;

Proc Report Data=XAMCPUBY headline headskip missing Style(Report)={Background=Black CellSpacing=1MM CellWidth=1MM} Style(Column)={Font_Size=10PT} Style(Header)={Foreground=Black Background=White Font_Size=10PT}; Column Env LPAR Cat Startime, CPUUtil; Define Env / '' Group Format=$Env.; Define LPAR / '' Group Format=$LPAR.; Define Cat / '' Group Format=$Cat.; Define Startime / '' Across Format=DTDate5.; Define CPUUtil / '' Analysis Mean Format=3.;Where DatePart(Startime) Between '01Mar10'd and '12Mar10'd;Title1 "Proc Report Example 3 - ODS Style Elements";Run;

ODS HTML Close;ODS Listing;

Page 15: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Example 3 - Output

Page 16: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Phase I SummaryProc Report

◦Easy to Use◦Powerful◦Integrates with ODS

Unattributed Dashboard◦May be all that is needed

Page 17: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Example 4 – SAS Code

LibName VelSoft "&Path\VelSoft";

Data VelSoft.XAMCPUBY;Length URL_Trend $19.;Set VelSoft.XAMCPUBY;

LPAR = Put(Serial,$LPAR.); Env = Serial; Cat = 'CPU';URL_Trend = Cats(Cat,'-',LPAR,'-mth.html');

ODS Html File="&path\VelSoft\Example_4.html" Style=Statistical;ODS Listing Close;ODS Html;

Page 18: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Example 4 – SAS Code

Proc Report Data=VelSoft.XAMCPUBY headline headskip missing;Style(Report)={Background=Black CellSpacing=1MM CellWidth=1MM}Style(Column)={Font_Size=10PT}Style(Header)={Foreground=Black Background=White Font_Size=10PT};Column Env URL_Trend LPAR Cat Startime, CPUUtil;Define Env / '' Group Format=$Env.;Define URL_Trend/ '' Group NoPrint;Define LPAR / '' Group;Define Cat / '' Group Format=$Cat.;Define Startime / '' Across Format=DTDate5.;Define CPUUtil / '' Analysis Mean Format=3.;

Compute Cat;Call Define('Cat','URLP',URL_Trend);EndComp;

Where DatePart(Startime) Between '01Mar10'd and '12Mar10'd;Title1 "Proc Report Example 4 - Assigning a URL";Run;

ODS HTML Close;ODS Listing;

Page 19: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Example 4 - Output

Page 20: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Example 5 – SAS Code

LibName VelSoft "&Path\VelSoft";

Data XAMCPUBY; Length URL_Trend $19. URL_Day $23.; Set VelSoft.XAMCPUBY;

Date = Datepart(StarTime); LPAR = Put(Serial,$LPAR.); Env = Serial; Cat = 'CPU'; URL_Trend = Cats(Cat,'-',LPAR,'-mth.html'); URL_Day = Cats(Cat,'-',LPAR,'-',PUT(DATE,DATE7.),'.html'); Where Date Between '01Mar10'd and '12Mar10'd;

Proc Summary Nway Data=XAMCPUBY; ID CAT ENV URL_Day URL_Trend; Class LPAR Date; Var CPUUtil; Output Out=CPU_Rpt(DROP=_TYPE_ _FREQ_) P90(CPUUtil)=Metric;

Data CPU_Rpt; Set CPU_Rpt; Bk_Color = Put(Metric,CPUFmt.);

ODS Html File="&path\VelSoft\Example_5.html" Style=Statistical;ODS Listing Close; ODS Html;

Page 21: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Example 5 – SAS CodeProc Report Data=CPU_Rpt headline headskip missing Style(Report)={Background=Black CellSpacing=1MM CellWidth=1MM} Style(Column)={Font_Size=10PT} Style(Header)={Foreground=Black Background=White Font_Size=10PT}; Column Env LPAR URL_Trend Cat Date, (URL_Day BK_Color Metric); Define Env / '' Group Format=$Env.; Define LPAR / '' Group Format=$LPAR.; Define URL_Trend/ '' Group NoPrint; Define Cat / '' Group Format=$Cat.; Define Date / '' Across Format=Date5.; Define URL_Day / '' Noprint; Define BK_Color / '' Noprint; Define Metric / '' Analysis Mean Format=3.; Compute Cat; Call Define('Cat','URLP',URL_Trend); EndComp; Compute Metric; Call Define( 7 ,"style",CATS("style={background=",_C6_,"}")); Call Define( 7,'URLP',_C5_); Call Define(10 ,"style",CATS("style={background=",_C9_,"}")); Call Define(10,'URLP',_C8_); Call Define(13 ,"style",CATS("style={background=",_C12_,"}")); Call Define(13,'URLP',_C11_); Repeating code blocks removed to save space Call Define(40 ,"style",CATS("style={background=",_C39_,"}")); Call Define(40,'URLP',_C38_); EndComp; Title1 "Proc Report Example 5 - Attributing Metric Cells";Run; Quit; ODS HTML Close; ODS Listing;

Page 22: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Example 5 - Output

Page 23: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Production zVM Dashboard

Page 24: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Related ReportingA Very Powerful Extension to the

primary data table.Can be 1 to N layers deep.

◦Only limit is the perseverance of the SAS programmer.

Number of Reports Quickly Adds Up◦5 vVM Lpars * 4 Resources * 30 Days

+ 20 Trend Graphs = 620 Reporting Objects

Housekeeping can become an issue

Page 25: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Related ReportingUse a Single SAS Dataset for all

the reporting tasks.◦Simplifies Link Value tracking◦Subset data with Where Clause using

Link ValuesReporting Object Macros are a

mustUse Proc SQL to create

‘parameterized’ invocation code

Page 26: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Macro for Trend Reports

%Macro Mth_Trend(URL_Trend=); ODS HTML Body="&URL_Trend" Path="&Path" (URL=None); Symbol1 I=BOXJ10; Axis1 ORDER=(&STRT_DAT TO &STOP_DAT BY DAY); Axis2 Order=(0 to 100 by 10) Label=None; Proc GPLOT Data=CPU; PLOT CPUUTIL*DATE / HAXIS=AXIS1 VAXIS=AXIS2 LEGEND=LEGEND1; LABEL CPUUTIL = "Total CPU Utilization"; Where URL_Trend = "&URL_Trend"; Title1 C=BLACK H=12 "zVM systems"; Title2 H=9 C=BLACK "CPU Percent Busy -- Fifteen Minute Interval Data"; Title3 "Box Range Spans the 25th to 75th Percentile"; Title4 "Wiskers Extend to the 90th Percentile"; Run; %Mend Mth_Trend;

Page 27: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Proc SQL to Create ‘Parameterized’ SAS Code

%MACRO Gen_Mth_Stmt; Proc SQL NoPrint; Select Distinct URL_Trend Into :Trend1 - :Trend&SYSMAXLONG From XAMCPUBY; Quit; %Do I = 1 %To &SQLOBS; %Mth_Trend(URL_Trend = &&Trend&I.); %End; Run; %MEND Gen_Mth_Stmt;

Page 28: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Sending Email NoticesVery Easy to Code in SASRequires some setup work by

SAS support programmer and email support staff.

SAS views email as an external file output destination.

Two step process◦Develop list of notices to send◦Use Data Step or Proc Print to send

them.

Page 29: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Collect the Notices

Data CPU_Rpt Exceptions; Set CPU_Rpt; If Metric = . Then Metric = 0; Bk_Color = Put(Metric,CPUFmt.); Output CPU_Rpt; Select (Bk_Color); When ('lime’,’blue'); Otherwise Output Exceptions; End; Run;

Page 30: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Send the Emails

FileName MyMail EMAIL Subject=("zVM Exceptions") TO=("[email protected]" "[email protected]") TYPE="TEXT/HTML";

ODS CHTML File=MyMail; Proc Print Data=Exceptions N NOOBS; TITLE1 "zVM Exceptions";Run; ODS CHTML Close;

Page 31: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

SummaryPowerful framework for reporting if your

audience is receptive to tabular data.Accommodates a dense presentation

format and discrete data points at the same time.

Easy to create with base SAS product.Traffic lighting of data cells highlights

exception conditionsDrill down capability allows user to

investigate.

Page 32: How to Build Tabular Dashboards Using Proc Report Shana Bereznay ACS Raff Rushton IBM Frank Bereznay IBM

Questions