102
MXG Tools and Usage Chuck Hopf

MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

Embed Size (px)

Citation preview

Page 1: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

MXG Tools and Usage

Chuck Hopf

Page 2: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

Agenda

ANALID ANALGRID VMXGPRNT VMXGFIND VMXGSRCH UTILWORK READDB2 UTILBLDP VMXGSUM ANALCNCR ANALCAPD

Page 3: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALID

New MACRO to create an SMF Audit dataset and report– READSMF=NO– PRINT=YES– PDBOUT=PDB– PERCENTS=YES– ODS parameters

Page 4: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALID – READSMF

READSMF=YES will read an SMF dataset. The default of NO is used in BUILDPDB to read the ID dataset already being created.

Driven by the value of the SMFAUDIT macro variable in VMXGINIT. If set to NO with a %LET the older style report is created with fewer variables.

Page 5: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALID – PRINT/PDBOUT/PERCENTS

PRINT=YES – prints SMF Audit report. To suppress the report specify NO.

PDBOUT=PDB – the destination of the new SMFRECNT dataset.

PERCENTS=YES – calculates the percentage of the data for each system represented by a single type/subtype.

Page 6: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALID – ODS Parameters

ODSTYPE= if you want to create HTML output specify HTML or specify some other valid ODS value. If blank ODS is not used.

ODSPATH= the pathname for the ODS output – typically a directory on ASCII or a PDSE or zFS directory on zOS

ODSFILE= the name of the output that will be created

Page 7: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALID - Example

%ANALID(

READSMF=YES,

PDBOUT=PDB,

PRINT=YES,

ODSTYPE=HTML,

ODSPATH=E:\.

ODSFILE=ANALID.HTML);

Page 8: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALID – Sample

Page 9: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALID - Sample

Page 10: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALID - Sample

Page 11: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALID – Sample

Page 12: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALID - Sample

Page 13: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALID - Sample

Page 14: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALID - Sample

Page 15: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALID - Sample

Page 16: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALID - Sample

Page 17: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALGRID

Creates a dense color coded grid of values using PROC REPORT

Does not require SAS/GRAPH Works on all SAS versions 9.1.3 and

above

Page 18: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALGRID

Example 1– Read ASUM70LP and for the specified

system create a grid of CPU busy for a day.

– This is the default with addition of an INCODE to select a specific LPAR

%ANALGRID(INCODE=IF LPARNAME=SYSG;);

Page 19: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALGRID

Page 20: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALGRID

Example 2 – compare year to year same month excluding weekdays and holidays

– %ANALGRID(– INDATA=RMFINTRV,– SORTBY=SYSTEM MONTH,– SYSTEM=SYSG,– INCODE=MONTH=DATEPART(STARTIME)-DAY(DATEPART(STARTIME))+1;– FORMAT MONTH MONYY.;– if 1 lt weekday(datepart(startime)) lt 7;– if month(datepart(startime))=1;– if datepart(startime) not in('26dec11'd,'24nov11'd,'25nov11'd,– '05sep11'd,'04jul11'd,'30may11'd,'21feb11'd,'17jan11'd,'24dec10'd,– '25nov10'd,'26nov10'd,'16jan12'd,'02jan12'd,'16jan12'd,'20feb12'd);,– TITLE1=% CPU Busy,– VARIABLE=pctcpuby,VARLABEL=% CPU,varformat=5.2,– ROWVARIABLE=DATE,ROWLABEL=DATE,ROWFORMAT=DATE.,– ODSPATH=e:,ODSFILE=april.html);

Page 21: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALGRID

Page 22: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALGRID

Page 23: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALGRID

You have complete control of– Colors and levels– Column and row variables– Column and row labels– Column and row formats

Page 24: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALGRID

%ANALGRID(

SYSTEM=SYSG, INDATA=RMFINTRV, SORTBY=SYSTEM, VARFORMAT=TIME12.2, dates=lastweek, BKT1='01:00'T/BLUE/WHITE, BKT2='02:00'T/GREEN/WHITE, BKT3='03:00'T/CYAN/BLACK, BKT4=, WEIGHT=, SORTLABEL=System, STAT=SUM, VARIABLE=CPUTM, odspath=e:, odsfile=cputime.html, VARLABEL=CPU TIME, COLVARIABLE=TIME,COLLABEL=TIME,COLFORMAT=TIME5.,

ROWVARIABLE=DATE,ROWLABEL=DATE,ROWFORMAT=DATE.

);

Page 25: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALGRID

Page 26: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGPRNT

Utility to print any SAS dataset with labels modified to include the variable name and/or create a comma delimited output (CSV).

Page 27: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGPRNT – Parameters

SP_DSET – dataset to be printed – defaults to _LAST_

SP_NOBS – number of OBS to be printed – defaults to 20

SP_REMV – remove * from labels in CSV file – defaults to NO

Page 28: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGPRNT – Parameters

TMPPRNT – destination for a temporary dataset – on zOS it will be constructed and dynalloc’ed as a temporary dataset but on ASCII will be placed in your SASUSER directory. Defaults to TMPPRNT.SAS

BYLST – list of BY variables – defaults to a null string

Page 29: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGPRNT – Parameters

VARLST – list of variables to be printed. Default is a null string which will print all variables

NOEXIMSG – suppresses various warnings/notes – default is YES

SP_OPNS – PROC PRINT options default is SPLIT=‘*’

Page 30: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGPRNT – Example 1

%VMXGPRNT(SP_DSET=PDB.DB2ACCT,SP_NOBS=3);

Print PDB.DB2ACCT

Page 31: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGPRNT – Example 1

Page 32: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGPRNT – Example 2

Create a CSV file– Filename csv ‘h:\mxg\vmxgprnt.csv’;– ods csvall file=csv;

– %vmxgprnt(SP_DSET=PDB.DB2ACCT,SP_NOBS=3,sp_remv=Y);

– run;

– ods csvall close;

– run;

Page 33: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGPRNT – Example 2

Page 34: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGFIND

Utility that will find every OBS in every dataset where some condition is satisfied and make a copy/print the observations.

For example:– Find all obs where JOB=:’CICS’

Page 35: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGFIND – Parameters

PDB= LIBNAME to be searched – default is PDB – can be 1 or many

PDBOUT= where to put the output datasets – datasets here will be named DDNAME_dataset where DDNAME is the libname where they were found

Page 36: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGFIND – Parameters

KEEPIN= a list of variables that are used in the comparison

FIND= the comparison – for example…– Job=:’CICS’

– KEEPIN=STARTIME STRTTIME INTBTIME,– FIND= IF ('31JAN2010:10:11:12'DT LE STARTIME LE '31JAN2010:22:23:24'DT )

OR ('31JAN2010:10:11:12'DT LE STRTTIME LE '31JAN2010:22:23:24'DT ) – OR ('31JAN2010:10:11:12'DT LE INTBTIME LE '31JAN2010:22:23:24'DT ) ;,

Page 37: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGFIND – Parameters

PRINT= default is NO– YES – print all the observations– NO – no print– xxx – print xxx observations

Page 38: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGFIND

If PRINT=YES or xxx then VMXGPRNT is used to do the printing

Example 1:– %VMXGFIND(FIND=QWHSSSID=DBTB,PRINT=3);

Page 39: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGFIND

Page 40: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH

Utility that will find every observation in every dataset in every allocated SAS data library where the value of the observation contains some string.– Note: libraries must have been allocated

either explicitly (LIBNAME statement) or by a DATA/PROC step.

Page 41: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH – Parameters

LIBNAME= the libname to be searched. Default is a NULL string. _ALL_ will search all allocated SAS data libraries (they don’t have to be MXG) and anything else will search that specific LIBNAME. Only LIBNAMEs that have been opened will be found!!!!! You may need to insert a LIBNAME on zOS.

Page 42: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH - Parameters

COPYTO= copy the datasets and observations that match to this LIBNAME

NOBS= the number of OBS to print – default is MAX

LOG= a large number of lines may be generated – LOG=NO suppresses them. Default is YES

Page 43: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH - Parameters

VALUE – the value to search for Results= what you want us to do

– PRINT – just print the obs/datasets that match– COPYONLY – copy the datasets but don’t print– COUNT – just produce a count of datasets/obs/variables

that match– LABEL – produce a list of variables/datasets where the

value is in the label– FORMAT – produce a list of variables/datasets where the

value is in the format

Page 44: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH – Example 1

%VMXGSRCH( LOG=NO,RESULTS=COUNT, VALUE=D2DD,LIBNAME=PDB);

Page 45: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH- Example 1

Page 46: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH – Example 2

%VMXGSRCH( LOG=NO,RESULTS=PRINT,NOBS=2, VALUE=D2DD,LIBNAME=PDB);

Page 47: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH – Example 2

Page 48: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH – Example 3

%VMXGSRCH( LOG=NO,RESULTS=PRINT,NOBS=2, VALUE=D2DD,LIBNAME=PDB, COPYTO=WORK);

Page 49: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH – Example 3

Page 50: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH – Example 4

%VMXGSRCH( LOG=NO,RESULTS=COPYONLY, VALUE=D2DD,LIBNAME=PDB, COPYTO=WORK);

Page 51: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH – Example 4

Page 52: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH – Example 5

%VMXGSRCH(VALUE=CPU,RESULTS=LABEL);

NOTE: Values are case sensitive

Page 53: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH – Example 5

Page 54: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH – Example 6

VMXGSRCH(VALUE=TIME,RESULTS=FORMAT);

Page 55: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSRCH – Example 6

Page 56: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

UTILWORK

Don’t understand the documentation on defining your workloads to RMFINTRV? This utility will build you a skeleton RMFINTRV member based on your TYPE72GO records.

Page 57: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

UTILWORK - Parameters

PDB= may be either SMF or some libname that contains a TYPE72GO dataset. SMF is preferred since the normal _ETY72GO exit will suppress service classes with no activity in an interval. You only need to use a single RMF interval.

Page 58: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

UTILWORK – Parameters

USEREPRT= YES/NO do you want to use report classes or service classes to define workloads. Strongly recommended that you use report classes since there can be many many more at no real cost.

Page 59: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

UTILWORK - Example

%UTILWORK(PDB=PDB, OUTFILE=RMFINTRV, USERPRT=YES, INTERVAL=QTRHOUR)

Page 60: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

UTILWORK - Example

Page 61: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

READDB2

MXG supplied macro that generates the code to read all of the different types of DB2 SMF data (all IFCIDs). It has been ‘enhanced’ to make a copy of the SMF data and allow for selection based on reading the record headers only which makes it very fast.

Page 62: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

READDB2

For a full list of parameters and usage see READDB2 member in the MXG SOURCLIB

Concentration here will be on selection parameters and copying of SMF data

Page 63: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

READDB2

SMFOUT= DDNAME to which SMF data will be copied – if blank no copy is made

COPYONLY= YES/NO – only copy SMF data do not format SAS datasets– Useful to make mini-SMF files to feed to

DB2PM or send off to vendors PDBOUT= DDNAME to which SAS datasets

are written (WORK is default if left blank)

Page 64: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

READDB2 - Parameters

SYSTEM – list of systems PLAN – list of plan names AUTHID – list of authorization IDs CORRID – list of correlation IDs CONNID – list of connection IDs DB2 – list of DB2 subsystems CONNTYPE – list of connect types

Page 65: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

READDB2 - Parameters

TRANNAME – list of end-user transaction names

PACKAGE – list of package names SMFBEGIN =SAS datetime constant –

starting point of data SMFEND – SAS datetime constant –

end point of data– SAS datetime constants are of the form

01sep10:01:30:00 – no quotes are needed

Page 66: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

READDB2

All values in lists separated by spaces All parameters separated by commas (except the last

one) All values are automatically wild carded – that is,

however many bytes are in the value is the length of the compare

SMFBEGN= earliest time in form ddmmmyy:hh:mm:ss or 10OCT08:15:00:00

SMFEND= latest time in same form

Page 67: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

READDB2

%READDB2(TRANNAME=OLB_DISP, COPYONLY=YES,SMFOUT=SMFOUT);– Copy records where TRANNAME starts with

OLB_DISP to SMFOUT DD but do not create SAS datasets

%READDB2(TRANNAME=OLB,PDB=WORK, SMFOUT=SMFOUT);– Copy records where TRANNAME starts with OLB

and also place them in SAS datasets in the WORK dataset

Page 68: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

UTILBLDP

UTILBLDP is a macro designed to simplify adding records to the normal MXG PDB (performance data base.) The coding in exits is not difficult if you understand it all but can be arcane to the uninitiated.

It can also be used to read multiple kinds of SMF data in a single pass of the SMF data and create the SAS datasets in WORK or in a PDB.

Page 69: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

UTILBLDP

Normally the code to read an SMF record is:– %INCLUDE SOURCLIB(TYPE30);

And to read two types you might code:– %INCLUDE SOURCLIB(TYPE30);– %INCLUDE SOURCLIB(TYPE1415);

But that would cause two passes of the SMF dataset which can be very large and make this an expensive and time consuming process.

With UTILBLDP this becomes:– %UTILBLDP(USERADD=30 1415,

BUILDPDB=NO,SORTOUT=NO,OUTFILE=INSTREAM);– %INCLUDE INSTREAM;

Page 70: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

UTILBLDP

For documentation on all parameters and usage see the member in the MXG SOURCLIB

For our purposes there are only a few important parameters

SORTOUT=NO – suppresses sorting and writing of the data to the PDB DD. You may want to use the sort (just add a PDB DD to your JCL) as it will remove any duplicate records.

USERADD= a list of the record types you wish to read – 30 6 1415 64 70 etc.

Page 71: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

UTILBLDP

OUTFILE= INSTREAM writes the data to the temporary dataset defined by the INSTREAM DD. You can then simply %INCLUDE INSTREAM to execute the code. If you want to STORE the code for future use (or just to see what the generated code looks like) route to a PDB member or a sequential dataset.

BUILDPDB=NO – suppresses the logic that builds the full MXG PDB.

Page 72: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM

Generalized summarization of ANY SAS dataset

– Uses PROC MEANS to do summarization– SORTs data– Allows for changes in input and output data– Optimizes variables kept – Carries labels and formats thru summarization– Allows for long variable names– Allows for normalization of variables and changing time intervals

Page 73: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM

Common in reporting:– DATA xxxx;– SET yyyy;– PROC SORT DATA=xxxx;– PROC MEANS DATA=XXXX OUT=zzzz;– DATA final;– SET zzzz;

Page 74: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM

VMXGSUM is a short-hand way of coding a repetitive set of commands.

Used extensively internally in many MXG members but especially common in ASUM**** and TRND**** members.

Page 75: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM - SYNTAX

%VMXGSUM(– INDATA= input dataset(s) name– OUTDATA= output dataset name– SUMBY= list of variables by which data

should be sorted– INCODE= a stub of SAS code executed

during the first data step– OUTCODE= a stub of SAS code executed

during the final data step

Page 76: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM - SYNTAX

– INTERVAL= how to change the time interval. Valid values are:

QTRHOUR HALFHOUR HOUR THREEHR MINUTE WEEK MONTH MYTIME

– DATETIME= the variable name of the variable containing the datetime value on which INTERVAL= will be applied

– SYNC59= if your time is synched to 59 minutes, will add 60 seconds before calculating interval if set to YES

Page 77: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM - SYNTAX

ID= list of variables that will be carried forward as ID values

AUTONAME=YES/NO AUTONAME = YES says to use the autonaming functions of SAS V8 to name the output variables.

– This allows the specification of the same variable name in multiple lists but changes the output variable name to variable_suffix where suffix is the name of the function performed on the variable.

Page 78: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM - SYNTAX

SUM= list of variables to be summed MAX= list of variables to be maxxed MIN= list of variables to be minned MEAN= list of variables to be meaned P1= list of variables to get percentile 1 P5= 5th percentile variables P10= 10th percentile variables

Page 79: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM - SYNTAX

– P25 P50 P75 P90 P95 P99 - percentile values

– STD - Standard Deviation– VAR - variance– CV - coefficient of variance– STDERR - Standard error– KURTOSIS - Kurtosis– T - T value

Page 80: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM - Syntax

NORM1-NORM99 - normalization of data. Maintaining rates as rates and not averages of averages. On the front-end, the rate has to be multiplied by the duration and on the back end divided again to recalculate the correct rate.

Page 81: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM - SYNTAX

– NORM1-NORM99 - syntax rate1 rate2 rate3…ratex/duration

List the variables to be normalized followed by a / then the variable to be used to do the normalization.

Page 82: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM - SYNTAX

There are other parameters. See the documentation in the member for usage and the member ADOCSUM.

Page 83: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM - Example 1

Summarize the dataset TYPETMNT by DEVICE and TMNTTIME calculating average mount delay and the total number of mounts per quarter hour.

%vmxgsum( indata=pdb.typetmnt, outdata=tapemnts, sumby=device tmnttime, interval=qtrhour, datetime=tmnttime, mean=tapmnttm, freq=mounts);

Page 84: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM - Example 2

Summarize the Goal Mode type 72 records for the TSO service class calculating the average response time, the number of transactions at one hour intervals by period.

Page 85: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM - Example 2

%VMXGSUM( INDATA=PDB.TYPE72GO, OUTDATA=TSOSUM, SUMBY=STARTIME PERIOD, INCODE= IF SRVCLASS=‘TSO’;, SUM=RESPAVG NUMTRAN, NORM1=RESPAVG/NUMTRAN, INTERVAL=HOUR, DATETIME=STARTIME);

Page 86: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM Usage Notes

NORMx operands must be contiguous starting at 1. That is, you cannot have NORM1 and NORM3 without a NORM2.

Page 87: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

VMXGSUM Usage Notes

The first data step is almost always converted to a VIEW rather than a real data step.

KEEPALL=NO is resource intensive and not really needed except in odd cases. KEEPALL=YES is much preferred. The keep lists on all output datasets are optimized regardless of KEEPALL setting.

Page 88: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

Why VMXGSUM?

So why not just use PROC MEANS with CLASS operands?

VMXGSUM in tests is usually much more efficient and in some cases will do the summarization where using PROC MEANS or PROC SUMMARY with CLASS operands runs out of memory.

This is especially true with the current release of SAS (9.1.3 SP4) on zOS which is defaulting to using THREADS.

Page 89: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALCNCR

Counts concurrent events. How many of something were happening at the same time.

Page 90: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALCNCR - History

Method used in original release of MXG:– DO TIME=BEGIN TO END BY 5;– OUTPUT;– END;– Then add up all the observations with a

given value of TIME. Created a HUGE number of observations and was cumbersome.

Page 91: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALCNCR - History

Method used with ANALCNCR:– TIME=BEGIN;COUNT=1;OUTPUT;– TIME=END;COUNT=-1;OUTPUT;

– Now add up the counts by time and you are done (basically.) Many many fewer observations.

Page 92: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALCNCR - History

If there are three tape allocations:

– Allocation 1 begins at 08:00 ends at 08:30– Allocation 2 begins at 08:15 ends at 08:25– Allocation 3 begins at 08:20 ends at 08:45

Page 93: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALCNCR - History

MAX of 3 concurrent allocations– 15 minutes of 1 – 5 minutes of 2 – 5 minutes of 3 – 5 minutes of 2 – 15 minutes of 1

Old method– Allocation 1 - 1800/5=360 obs– Allocation 2 - 600/5=120 obs– Allocation 3 - 1500/5=300 obs– Total = 780 obs

New Method– Each allocation is 2 OBS– Total = 6

Page 94: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALCNCR - Example 1

How many jobs are running concurrently in class A average and max.

%ANALCNCR(INDATA=PDB.JOBS, OUTSUMRY=RUNTIME, SUMBY=JOBCLASS, INCODE=IF TYPETASK=‘JOB’;, INTERVAL=QTRHOUR, STARTIME=JINITIME, ENDTIME=JTRMTIME, OTCODESM= AVGRUN=CONCURNT/DURATM; RENAME MAXCNCR=MAXRUN;);PROC PRINT;ID JOBCLASS TIMESTMP;VAR AVGRUN MAXRUN;

Page 95: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALCNCR - Example 2

Now suppose you want the INPUT QUEUE time for the same job class.

%ANALCNCR(INDATA=PDB.JOBS, OUTSUMRY=QUETIME, SUMBY=JOBCLASS, INCODE=IF TYPETASK=:’JOB’;, INTERVAL=QTRHOUR, STARTIME=READTIME, ENDTIME=JINITIME, OTCODESM= AVGQUE=CONCURNT/DURATM; RENAME MAXQUE=MAXRUN;);PROC PRINT;ID JOBCLASS TIMESTMP;VAR AVGQUE MAXQUE;

Page 96: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALCNCR - Example 3

Now put the two outputs together

DATA JOBSTAT;MERGE RUNTIME QUETIME;BY JOBCLASS TIMESTMP;PROC PRINT;ID JOBCLASS TIMESTMP;VAR AVGQUE AVGRUN MAXQUE MAXRUN;

Page 97: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALCAPD

Can you save money by capping the MSU’s consumed? Billing is based on the peak of the rolling 4 hour MSU average Rolling average will (almost) always lag behind actual usage So, you can set a cap lower than the actual peak and possibly

reduce software billing ANALCAPD will let you ‘play’ with values to find a happy MSU

value that allows work to run while reducing the peak MSU value

Page 98: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALCAPD

Uses the ASUMCEC dataset in the PDB as input

Best granularity is when you match CECINTRV to INTERVAL in ASUM70PR

Page 99: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALCAPD – Parameters

PDB=PDB – where is the ASUMCEC data GRAPHICS=YES – use SAS/GRAPH (it will

detect if it is not there) DEFCAP= the MSU value you want to ‘model’ CECINTRV=HOUR – the CECINTRV value in

use – QTRHOUR HALFHOUR etc

Page 100: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALCAPD - Results

Page 101: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD

ANALCAPD – Results

Black line is current capacity Cyan line is current cap (in this case

there is not one) Blue line is actual usage Green line is rolling 4 hour average Red * are the intervals where the CEC

would have been capped

Page 102: MXG Tools and Usage Chuck Hopf. Agenda n ANALID n ANALGRID n VMXGPRNT n VMXGFIND n VMXGSRCH n UTILWORK n READDB2 n UTILBLDP n VMXGSUM n ANALCNCR n ANALCAPD