1.78k likes | 1.79k Views
Learn how to install MXG on zOS and ASCII, tailor MXG for your needs, and leverage key utilities like UTILWORK and VMXGSUM. Discover analysis strategies with ANALID, ANALGRID, and more.
E N D
MXG Tools and Usage Chuck Hopf PPT Available at MXG.COM Download Site
Agenda – Building the PDB • Installing MXG zOS and ASCII • Tailoring MXG • UTILWORK • VMXGALOC\VGETALOC • UTILBLDP • BLDSMPDB • READDB2 • VMXGSUM
Agenda - Analysis • ANALID • ANALGRID • ANALCOMP • VMXGPRNT • VMXGFIND • VMXGSRCH • ANALCNCR • ANALCAPD
Installing MXG – zOS • Download either the TRSversion.TRS or the EBCversion.EBC datasets from the MXG website. TRS is a tersed copy of the MXG SOURCLIB and when untersed creates the PDS containing all of the SOURCE. The EBC version is in IEBUPDTE format and requires you to run IEBUPDTE to create the SOURCLIB. Either will work – it is a matter of which you find easier.
Installing MXG – zOS • FTP Tersed • //FTPMXG EXEC PGM=FTP,PARM='(EXIT=4' • //SYSPRINT DD SYSOUT=*,DCB=BLKSIZE=133 • //SYSABEND DD SYSOUT=* • //SYSOUT DD SYSOUT=* • //FTPOUT DD SYSOUT=* • //SYSIN DD * • 70.86.188.234 • USERID • PASSWORD • LOCSITE LRECL=1024 RECFM=FB BLKSIZE=6144 • LOCSITeuNIT=SYSDA PRIMARY=5000 SECONDARY=300 • BINARY • GET TER3006.TER 'MXG.TER3006.TER' (REPLACE • CLOSE • QUIT
Installing MXG - zOS • FTP IEBUPDTE //FTPMXG EXEC PGM=FTP,PARM='(EXIT=4' //SYSPRINT DD SYSOUT=*,DCB=BLKSIZE=133 //SYSABEND DD SYSOUT=* //SYSOUT DD SYSOUT=* //FTPOUT DD SYSOUT=* //SYSIN DD * 70.86.188.234 USERID PASSWORD LOCSITE LRECL=80 RECFM=FB BLKSIZE=0 LOCSITE UNIT=SYSDA PRIMARY=5000 SECONDARY=300 GET EBC3006.EBC 'MXG.V3006.EBCDIC’ (REPLACE CLOSE QUIT
Installing MXG - zOS • UNTERSE //UNTERSE EXEC PGM=TRSMAIN,PARM='UNPACK' //SYSPRINT DD SYSOUT=* //INFILE DD DSN=MXG.TER3006.TER,DISP=SHR //OUTFILE DD DSN=MXG.V3006.MXG.SOURCLIB,UNIT=SYSDA, // DISP=(NEW,CATLG),RECFM=FB,LRECL=80,BLKSIZE=0, // AVGREC=M,SPACE=(80,(3,1,1199)) PDS: 3 MIL 80 BYTE RECS
Installing MXG - zOS • IEBUPDTE //STEP1 EXEC PGM=IEBUPDTE,PARM=NEW //SYSPRINT DD DUMMY PRINTS 3,000,000+ LINES, THE ENTIRE MXG //* SOURCE LIBRARY, IF UN-DUMMIED; DON'T DOIT. //SYSIN DD DSN=MXG.V3006.EBCDIC,DISP=SHR //SYSUT2 DD DSN=MXG.V3006.MXG.SOURCLIB,UNIT=SYSDA, // DISP=(NEW,CATLG),RECFM=FB,LRECL=80,BLKSIZE=0, // AVGREC=M,SPACE=(80,(3,1,1199)) PDS: 3 MIL 80 BYTE RECS
Installing MXG - zOS • Building one or more USERID.SOURCLIBs. • Why more than one?? • Sometimes putting in an entire new release is not necessary but it can result in mounds of paperwork (which we all love.) • Putting in a single member can reduce the paperwork since it then becomes a ‘fix’ and not a new release • Putting those ‘fixes’ into a CHANGES.SOURCLIB between new releases and then emptying CHANGES when you put in the new release can be simpler
Installing MXG – zOS • Building USER SOURCLIBs //STEP2 EXEC PGM=IEFBR14 //USERID DD DSN=MXG.USERID.SOURCLIB,UNIT=SYSDA, // DISP=(NEW,CATLG),RECFM=FB,LRECL=80,BLKSIZE=0, // SPACE=(CYL,(15,15,99)) //CHANGES DD DSN=MXG.CHANGES.SOURCLIB,UNIT=SYSDA, // DISP=(NEW,CATLG),RECFM=FB,LRECL=80,BLKSIZE=0, // SPACE=(CYL,(15,15,99))
Installing MXG - zOS • Run FORMATS //FORMATS EXEC SAS,ENTRY=SAS, // CONFIG='MXG.V3006.MXG.SOURCLIB(CONFIGV9)' //SASLOG DD SYSOUT=* //SASLIST DD SYSOUT=* //SOURCLIB DD DSN=MXG.USERID.SOURCLIB,DISP=SHR // DD DSN=MXG.CHANGES.SOURCLIB,DISP=SHR // DD DSN=MXG.V3006.MXG.SOURCLIB,DISP=SHR //LIBRARY DD DSN=MXG.V3006.MXG.FORMATS, // UNIT=SYSDA,DISP=(NEW,CATLG),SPACE=(CYL,(12,2)) //SYSIN DD * %INCLUDE SOURCLIB(FORMATS); //*
Installing MXG - zOS • An MXGSAS PROC is no longer required. • In your USERID.SOURCLIB create a member MXGNAMES as follows: %LET MXGSOURC=MXG.V3006.SOURCLIB; %LET MXGFORMT=MXG.FORMATS; %LET MXGUSER1=MXG.CHANGES.SOURCLIB; %LET MXGUSER2=MXG.USERID.SOURCLIB; %LET MXGUSER3=;
Installing MXG - zOS • Now you can use the base SAS PROC which keeps SAS changes out of the way. //STEP1 EXEC SAS,CONFIG=‘MXG.SOURCLIB(CONFIMXG)’ //MXGNAMES DD DSN=MXG.USERID.SOURCLIB(MXGNAMES),DISP=SHR //whatever other DDs are needed for the job //SYSIN DD * your SAS program
Installing MXG – zOS • NOTE: You cannot use the CONFIMXG CONFIG and the MXGNAMEs structure with the build of FORMATS. That requires the DISP on the LIBRARY DD to be OLD. But you also do not need a special PROC – just the JCL above a few slides. • Now MXG is installed on zOS and it is time to move on to tailoring.
Installing MXG – zOS • The JCL to complete these tasks can be found in the JCLINST* members in the SOURCLIB
Installing MXG - ASCII • There are things you have to decide first • Where will you put the MXG SOURCLIB and FORMATS libraries? • Where do you want to store the data? It does not have to be the same drive as the SOURCLIB/FORMATS • Do you want to use fixed datasets or pseudo-GDG datasets (recommended)?
Installing MXG – ASCII • Create directories – use / rather than \ on LINUX MKDIR C:\MXG CD MXG MKDIR FORMATS MKDIR USERID MKDIR CHANGES MKDIR SMFDATA MKDIR PDB MKDIR SPIN MKDIR CICSTRAN MKDIR DUMMY MKDIR DB2ACCT MKDIR MWINPUT (optional – only needed for VM data)
Installing MXG - ASCII • Download zip file following the instructions you were sent after requesting a download. You are looking for dirversion.zip • Unzip the file into the SOURCLIB directory • Copy AUTOEXEC.SAS into your USERID directory
Installing MXG - ASCII • Editing AUTOEXEC.SAS – use whatever editor you like. I use SPFPC largely because it is what I have become accustomed to using over the last 4 decades. • Look for: FILENAME SOURCLIB ('C:\MXG\USERID' 'C:\MXG\SOURCLIB'); LIBNAME LIBRARY 'C:\MXG\FORMATS'; • Change Modify to match your configuration (if you put MXG somewhere other than c:\MXG) and add C:\MXG\CHANGES between USERID and SOURCLIB.
Installing MXG – ASCII • Editing AUTOEXEC.SAS – these should also be changed to match your configuration. SMFSMALL can be an ‘empty’ file as can MONWRITE.U. If you have no VM systems the MWINPUT line can be deleted. FILENAME SMF 'C:\MXG\SMFDATA\SMFSMALL.U' RECFM=S370VBS LRECL=32760 BLKSIZE=32760; LIBNAME PDB 'C:\MXG\PDB'; LIBNAME CICSTRAN 'C:\MXG\CICSTRAN'; LIBNAME SPIN 'C:\MXG\SPIN'; LIBNAME DB2ACCT 'C:\MXG\DB2ACCT '; /* MXG REQUIRED FOR SOME PROGRAMS - CREATE AS ZERO LENGTH */ FILENAME INSTREAM 'C:\MXG\USERID\INSTREAM.SAS'; /* MXG REQUIRED FOR MONTHBLD */ LIBNAME DUMMY 'C:\MXG\DUMMY '; /* FOLLOWING EXAMPLES ARE FOR VM/ESA (AND VM/XA) PROCESSING */ FILENAME MWINPUT 'C:\MXG\VMDATA\MONWRITE.U' RECFM=F LRECL=4096 BLKSIZE=28672;
Installing MXG - ASCII • Create an MXG shortcut on your desktop • Copy a SAS shortcut and add the autoexec so that it looks like "C:\Program Files\SASHome\SASFoundation\9.3\sas.exe" -CONFIG "C:\Program Files\SASHome\SASFoundation\9.3\nls\en\sasv9.cfg" -autoexec ‘c:\mxg\userid\autoexec.sas‘ • Change the ICON if you wish – here is the one I use
Installing MXG - ASCII • Now click on the ICON you just created – that should start an interactive SAS session • Put %include sourclib(formats); in the program window and press PF3 to build the FORMATs library. • Now MXG is installed and it is time to move on to tailoring.
Tailoring MXG • Copy these members from the SOURCLIB to your USERID SOURCLIB: IMACACCT – formats accounting information IMACSHFT – sets shift boundaries IMACSPIN – sets SPIN limits IMACUCB – can change DEVICE type for specific UCBS RMFINTRV – defining WORKLOADs
Tailoring MXG - IMACACCT • IMACACCT lets you control the size of the individual account fields and the number of account fields that are kept for job level information. There is documentation in the member on tailoring it to meet your site standards for accounting data.
Tailoring MXG - IMACSHFT • IMACSHFT defines the shift boundaries – this may or may not be important depending on your reporting requirements. • There is documentation in the member on modifying the defaults • The MXG defaults are: 8AM-5PM Mon-Fri – P 5PM-8AM Mon-Fri – N 08:00 Sat-08:00 Mon – W There is an optional H for holidays that can also be coded
Tailoring MXG - IMACSHFT • Often times the first time a manager sees a report by SHIFT (and the next 150 times) they will ask – ‘What does P mean?’ • You can assign a format to the SHIFT variable that better describes it. PROC FORMAT LIB=LIBRARY; VALUE $SHIFT; ‘P’=’08:00-17:00 Mon-Fri’ ‘N’=’17:00-08:00 Mon-Sat’ ‘W’=‘Weekends’ ‘H’=‘Holiday’; And then add: %LET MACSHFT=%quote(FORMAT SHIFT $SHIFT.;); to your AUTOEXEC.SAS after the invocation of VMXGINIT.
Tailoring MXG - IMACSPIN • Controls the number of times JOB information is ‘spun’. Complete doc on SPIN logic can be found in the DOCPDB member. • A job comes in pieces – read. Step term. Job term, print, purge. Spinning keeps the data out of the PDB until all records are received. • If accounting/chargeback is important you may want to change IMACSPIN to the number of days output can sit on the spool before being purged. MACRO _SPINCNT 0 to the number of days you want to SPIN %
Tailoring MXG - IMACUCB • Only important if you have many different types of tape or disk drives and want to discretely identify the TYPE of device. IF 220X LE DEVNR LE 26FX THEN DEVICE='SILO'; ELSE IF 0F270X LE DEVNR LE 0F277X THEN DEVICE='AUTOLOD'; ELSE IF 800x le 9FFx then DEVICE=‘IBM8800’; ELSE IF 1000x le 1FFFX then DEVICE=‘HDS8000’;
Tailoring MXG – RMFINTRV • This may be the single most important tailoring you need to do. It defines the workloads used in constructing the RMFINTRV dataset and is based on your WLM profile as recorded in the TYPE 72 RMF data. • You can use either service classes or report classes but trying to use both will invariably result in recording more than 100% CPU busy and will be flagged as an error.
Tailoring MXG - RMFINTRV • If you use report classes (recommended) then every workload must have a default report class defined in your classification rules in WLM. • If you use service classes, the granularity of the data is restricted to the number of service classes.
Tailoring MXG - RMFINTRV • If you are not familiar with your WLM profile you need to become very good friends with the person that maintains WLM. • UTILWORK is designed to give you a head start on constructing the RMFINTRV member in your USERID SOURCLIB.
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.
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.
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.
UTILWORK - Example • %UTILWORK(PDB=PDB, OUTFILE=RMFINTRV, USERPRT=YES, INTERVAL=QTRHOUR)
UTILWORK - zOS • JCL to run UTILWORK //STEP1 EXEC SAS,CONFIG=‘MXG.PROD.SOURCLIB(CONFIMXG)’ //MXGNAMES DD DSN=MXG.USERID.SOURCLIB(MXGNAMES),DISP=SHR //RMFINTRV DD DSN=MXG.USERID.SOURCLIB(RMFINTRV),DISP=OLD //SMF DD DSN=YOUR.SMF.DATA,DISP=SHR //SYSIN DD * %UTILWORK(PDB=SMF,OUTFILE=RMFINTRV, USERPRT=YES,INTERVAL=QTRHOUR);
UTILWORK - ASCII • Run UTILWORK on ASCII FILENAME SMF FTP ‘YOUR.SMF.DATA’ USER='username' HOST='where.i.loading.from’ RCMD='SITE RDW' S370VS LRECL=32760 PASS='password’; FILENAME RMFINTRV ‘C:\MXG\USERID\RMFINTRV.SAS’; %UTILWORK(PDB=SMF,OUTFILE=RMFINTRV, USERPRT=YES,INTERVAL=QTRHOUR);
UTILWORK - Example %VMXGRMFI( INTERVAL=QTRHOUR, USEREPRT=GOAL, USECNTRL=NO, WORK1=WORK1/ADABASP//ADABASP/1 , WORK2=WORK2/ADABAST//ADABAST/1 WORK3=WORK3/ADREPROD//ADREPROD/1 , WORK4=WORK4/ADRETEST//ADRETEST/1 , WORK5=WORK5/BATPROD//BATPROD/2 , WORK6=WORK6/BATTEST//BATTEST/2 , WORK7=WORK7/BPRMGMT//BPRMGMT/1 , WORK8=WORK8/BUSREPRT//BUSREPRT/1 , WORK9=WORK9/CICSNIPP//CICSNIPP/1 , WORK10=WORK10/CICSOTHR//CICSOTHR/1 , WORK11=WORK11/CICSPROD//CICSPROD/1 , WORK12=WORK12/CICSTA//CICSTA/1 , WORK13=WORK13/CICSTAH4//CICSTAH4/1 …
UTILWORK -Editing • Once you have the base RMFINTRV, you may want to combine some of the workloads it found into a single workload • These all represent production CICS response time service classes WORK12=WORK12/CICSTA//CICSTA/1 , WORK13=WORK13/CICSTAH4//CICSTAH4/1 , WORK15=WORK15/CICSTRNT//CICSTRNT/1 , WORK16=WORK16/CICSTXM//CICSTXM/1 , • And could be combined into WORK12=PRODCICS/PRODCICS//CICSTA CICSTAH4 CICSTRNT CICSTXM/1 ,
UTILWORK - Caveat • WORKLOADs must be continuous so when you combine multiples into one you will need to renumber and remove the unneeded ones • WORK1= WORK2= WORK3= etc works • WORK1= WORK3= will not fail but will never see work3 or anything beyond WORK1
UTILWORK - Workloads • Each workload has up to 7 possible sub-parameters • First x characters of the variable names in RMFINTRV (if this is PRODCICS you would see variable names like PRODCICSCPU in the RMFINTRV dataset.) • Text used in labels (up to 9 characters) • Blank – was for performance groups now archaic and is ignored • Service/report classes in the workload • Number of periods in the workload • System IDs to which this workload applies • Sysplex IDs to which this workload applies
UTILWORK – Final Edit %VMXGRMFI(PDB=PDB, OUTDATA=PDB.RMFINTRV, SYNC59=1.1, INTERVAL=QTRHOUR, IMACWORK=NO, USECNTRL=NO, USEREPRT=GOAL, WORK1=BAT/TEST BATCH/ / BATTEST, WORK2=CICS/PROD CICS/ /CICSNIPP CICSOTHR CICSTA: CICSTXM CICSPROD, WORK3=DB2/PROD DB2/ /DB2PROD, WORK4=CICT/CICS TEST/ /CICSTEST CICSTRNT, WORK5=DB2T/DB2 TEST/ /DB2TEST, WORK6=ADAP/ADABAS PROD/ /ADABASP, WORK7=ADAT/ADABAS TEST/ /ADABAST, WORK8=REPP/REP DATABASE PROD/ /ADREPROD, WORK9=REPT/REP DATABAEE TEST/ /ADRETEST, WORK10=BATP/BATCH PROD/ /BATPROD,
UTILWORK – Final Edit WORK11=DDFP/DDF PROD/ /DDFDB2P TESTDB2, WORK12=DDFU/DDF UXX PROD/ /UXXIF3 UXXMS3 UXXRS3 UXXCOM UXXCLB BPRMGMT BUSREPRT CLIADMIN CLIAUDIT CLIBILL CLIREQST CONSADMN CONTMGMT COREINFR DQMMGMT ENTARCH ESBBUS GSMUTIL IDSRCH IDSRVICE PASADMIN PRTADMIN RPTDELIV RPTJOBS RPTQUERY SYSCONF TAXAUTH UNISEC UTILCOMN UTILORDR UXXPRC, WORK13=DDFW/DDF TEST/ /DDFDB2W UXXIF12 UXXMS12 UXXRS12 DDFTEST DDFACCT DDFAPP, WORK14=HSM/HSM/ /DFHSM, WORK15=EXBP/REP BROKER PROD/ /EXBPROD, WORK16=EXBT/REP BROKER TEST/ /EXBTEST, WORK17=NDM/NDM/ /NDM, WORK18=REPB/REP SRV PROD/ /REPLPROD, WORK19=REPS/REP SRV TEST/ /REPLTEST REPL23, WORK20=STCP/STC PRODUCTS/ /STCPROD NETWORK MONITORS, WORK21=STCS/STC SYSTEM/ /STCSYS, WORK22=TSO/TSO/ /TSO, WORK23=XPTR/XPTR PROD/ /XPTRPROD, WORK24=XPTT/XPTR TEST/ /XPTRTEST, WORK25=STAG/STAGING/ /STAGING, WORK26=OMVS/OMVS/ /REPOMVS);
Getting Ready for BUILDPDB • Do you want to use GDGs or fixed datasets? GDGs are recommended. • No need for backups • Data retention is simpler • On zOS HSM can handle migration and recalls as needed • On ASCII – pseudo-GDG structure using dates in the directories has similar advantages
Building GDGs - zOS //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE GENERATIONDATAGROUP - (NAME(MXG.DAILY.PDB) LIMIT(255) - NOEMPTY ) DEFINE GENERATIONDATAGROUP - (NAME(MXG.DAILY.SPIN) LIMIT(7) - NOEMPTY ) DEFINE GENERATIONDATAGROUP - (NAME(MXG.WEEKLY.PDB) LIMIT(255) - NOEMPTY ) DEFINE GENERATIONDATAGROUP - (NAME(MXG.DAILY.DB2ACCT) LIMIT(20) - NOEMPTY ) DEFINE GENERATIONDATAGROUP - (NAME(MXG.DAILY.CICSTRAN) LIMIT(20) - NOEMPTY ) DEFINE GENERATIONDATAGROUP - (NAME(MXG.MONTHLY.PDB) LIMIT(60) - NOEMPTY )
Building GDGs - zOS • List above is incomplete. Depending on how you structure your jobs you may need more datasets • GDG limits are arbitrary – they can be anything up to 255 – as written above you would have 2/3 of a year of daily datasets, almost 5 years of weekly, and 5 years of monthly data. It may be more or less than you need. • JCL to define GDGs is in the SOURCLIB as JCLSPGDG
GDGs on ASCII • ASCII systems don’t support the concept of a GDG so MXG uses VMXGALOC and VGETALOC to simulate GDG structures by building directories in a place of your choice with a character (D for daily) followed by a date in the format of your choosing. It then keeps as many copies as you specify and deletes them when their time has come.
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
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
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