1 / 102

MXG Tools and Usage

MXG Tools and Usage. Chuck Hopf. Agenda. ANALID ANALGRID VMXGPRNT VMXGFIND VMXGSRCH UTILWORK READDB2 UTILBLDP VMXGSUM ANALCNCR ANALCAPD. ANALID. New MACRO to create an SMF Audit dataset and report READSMF=NO PRINT=YES PDBOUT=PDB PERCENTS=YES ODS parameters.

akio
Download Presentation

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 • ANALID • ANALGRID • VMXGPRNT • VMXGFIND • VMXGSRCH • UTILWORK • READDB2 • UTILBLDP • VMXGSUM • ANALCNCR • ANALCAPD

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

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

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

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

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

  8. ANALID – Sample

  9. ANALID - Sample

  10. ANALID - Sample

  11. ANALID – Sample

  12. ANALID - Sample

  13. ANALID - Sample

  14. ANALID - Sample

  15. ANALID - Sample

  16. ANALID - Sample

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

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

  19. ANALGRID

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

  21. ANALGRID

  22. ANALGRID

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

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

  25. ANALGRID

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

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

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

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

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

  31. VMXGPRNT – Example 1

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

  33. VMXGPRNT – Example 2

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

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

  36. 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 ) ;,

  37. VMXGFIND – Parameters • PRINT= default is NO • YES – print all the observations • NO – no print • xxx – print xxx observations

  38. VMXGFIND • If PRINT=YES or xxx then VMXGPRNT is used to do the printing • Example 1: • %VMXGFIND(FIND=QWHSSSID=DBTB,PRINT=3);

  39. VMXGFIND

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

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

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

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

  44. VMXGSRCH – Example 1 • %VMXGSRCH( LOG=NO,RESULTS=COUNT, VALUE=D2DD,LIBNAME=PDB);

  45. VMXGSRCH- Example 1

  46. VMXGSRCH – Example 2 • %VMXGSRCH( LOG=NO,RESULTS=PRINT,NOBS=2, VALUE=D2DD,LIBNAME=PDB);

  47. VMXGSRCH – Example 2

  48. VMXGSRCH – Example 3 • %VMXGSRCH( LOG=NO,RESULTS=PRINT,NOBS=2, VALUE=D2DD,LIBNAME=PDB, COPYTO=WORK);

  49. VMXGSRCH – Example 3

  50. VMXGSRCH – Example 4 • %VMXGSRCH( LOG=NO,RESULTS=COPYONLY, VALUE=D2DD,LIBNAME=PDB, COPYTO=WORK);

More Related