1 / 115

MXG Tools and Usage

MXG Tools and Usage. Chuck Hopf. Agenda – Building the PDB . VMXGALOCVGETALOC UTILBLDP BLDSMPDB UTILWORK READDB2 VMXGSUM . Agenda - Analysis. ANALID ANALGRID VMXGPRNT VMXGFIND VMXGSRCH ANALCNCR ANALCAPD. VMXGALOC – Pseudo GDGs. ASCII ONLY – Windows or LINUX

moe
Télécharger la présentation

MXG Tools and Usage

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MXG Tools and Usage Chuck Hopf

  2. Agenda – Building the PDB • VMXGALOC\VGETALOC • UTILBLDP • BLDSMPDB • UTILWORK • READDB2 • VMXGSUM

  3. Agenda - Analysis • ANALID • ANALGRID • VMXGPRNT • VMXGFIND • VMXGSRCH • ANALCNCR • ANALCAPD

  4. VMXGALOC – Pseudo GDGs • ASCII ONLY – Windows or LINUX • Allocates directories and assigns LIBNAMEs using a date based structure • Allows you to ‘keep’ as many generations as you wish of each type of data – daily, weekly, trend, spin, db2acct, cicstran, monthly

  5. VMXGALOC – Parameters • BASEDIR=C:\MXG – where do you want to put the directories? Can be any valid location so long as it is connected to the system executing SAS/MXG • FORCEDAY= used in the event of a rerun or the need to report for some given day - can be a SAS date value – 27AUG12 or a relative value – today()-2

  6. VMXGALOC - Parameters • WEEKSTRT=MON – the day of the week on which your week starts. MON is the MXG default • Number of generations - • WEEKKEEP=12 – keep 12 weeks • DAYSKEEP=14 – keep 14 days • MNTHKEEP=15 – keep 15 months • CICSKEEP=15 – keep 15 days of CICSTRAN • DB2KEEP=14 – keep 14 days of DB2ACCT

  7. VMXGALOC Parameters • RUNWTD=NO – change to yes to run week to date logic • RUNMTD=NO – change to yes to run month to date logic • TRENDING=daily or weekly – how often to update TREND databases • READONLY=yes/no if NO the aging of old generations is suppressed • CLEARALL=YES clears the normal default LIBNAMEs from AUTOEXEC

  8. VMXGALOC Parameters • DATEFMT= can be any valid DATE format… • date date7 date9 • mmddyy6 8 10 • ddmmyy 6 8 10 • yymmdd 6 8 10 • julian 5 7 • If the format (mmddyy8. for example) contains / then the equivalent mmddyyd8. is substituted • An invalid datefmt will result in an ABEND

  9. VGETALOC • VGETALOC will fetch a ‘range’ of dates for daily/weekly/monthly PDBs and pass that information to VMXGSET so that you could say something like: • %vgetaloc(getdaterange=12jul12 23jul12, typeofdata=daily,basedir=c:\mxg); data jobs; set %vmxgset(dataset=jobs);

  10. VGETALOC • Can only be used on ASCII systems where VMXGALOC has been used to create pseudo-GDGs • If a date in the date range does not exist it is skipped

  11. VGETALOC - Parameters • GETDATERANGE – the range of dates in the form of SAS date values to be searched • TYPEOFDATA – DAILY WEEKLY MONTHLY? • DATEFORMAT – the DATE format used in VMXGALOC • BASEDIR – the directory as specified in VMXGALOC

  12. 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;

  13. 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.

  14. 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.

  15. 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.

  16. BLDSMPDB • Build the daily/weekly/monthly/trend databases from a single job on ASCII platforms (the JCL just would not work on zOS – could be done using DYNALLOC and LIBNAME statements but that would preclude the use of GDGs.)

  17. BLDSMPDB • There are numerous parameters – too many to mention here but all are documented in the member of SOURCLIB • Allows for reruns • User code • Run daily/weekly/monthly • Run WTD MTD • Run TRENDing daily/weekly • Read DCOLLECT and Tape management data • And much much more…

  18. Usage • Combine these to tailor your PDB • Use UTILBLDP to add/subtract record types and specify things to run after BUILDPDB • Use BLDSMPDB to control the execution of BUILDPDB

  19. Example • Suppress CICSTRAN and DB2ACCT but process statistics datasets for both CICS and DB2 • Add TYPE6156 and TYPE42 data to the PDB • Suppress TYPE74 data

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

  21. 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.

  22. 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.

  23. 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

  24. ANALID - Example %ANALID( READSMF=YES, PDBOUT=PDB, PRINT=YES, ODSTYPE=HTML, ODSPATH=E:\. ODSFILE=ANALID.HTML);

  25. ANALID – Sample

  26. ANALID - Sample

  27. ANALID - Sample

  28. ANALID – Sample

  29. ANALID - Sample

  30. ANALID - Sample

  31. ANALID - Sample

  32. ANALID - Sample

  33. ANALID - Sample

  34. 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

  35. 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;);

  36. ANALGRID

  37. 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);

  38. ANALGRID

  39. ANALGRID

  40. ANALGRID • You have complete control of • Colors and levels • Column and row variables • Column and row labels • Column and row formats

  41. 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. • );

  42. ANALGRID

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

  44. 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

  45. 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

  46. 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=‘*’

  47. VMXGPRNT – Example 1 • %VMXGPRNT(SP_DSET=PDB.DB2ACCT,SP_NOBS=3); • Print PDB.DB2ACCT

  48. VMXGPRNT – Example 1

  49. VMXGPRNT – Example 2 • Create a CSV file • Filename csv ‘h:\mxg\vmxgprnt.csv’; • odscsvall file=csv; • %vmxgprnt(SP_DSET=PDB.DB2ACCT,SP_NOBS=3,sp_remv=Y); • run; • odscsvall close; • run;

  50. VMXGPRNT – Example 2

More Related