MACRO 00001000 SYSMON &TIME=(09:00,17:00),&LIMIT=(50000,NOSTOP),&USERID=OPERAX00002000 TOR,&ENABLE=(PERFORM,USER,DASTAP),&CLASS=M,&AUTO=NO,&BUFX00003000 FS=CPU 00004010 GBLC &SY$MON @V60BBBC 00004300 &SY$MON SETC 'HERE' ANNOUNCE PRESENCE TO SYSLOCS @V60BBBC 00004600 LCLA &I,&K,&NUM,&NUM1,&NUM2,&NUMTS,&AUTST,&EN 00005000 LCLA &DEC,&J,&I1,&NUMME,&NUMMS 00006000 LCLA &VAL(8) 00007000 LCLC &RS,&HS,&HE,&AUT,&NOTN(8),&ME,&MS 00008000 LCLC &ABBR(8) @VA08717 00008100 LCLC &HEX,&ENC,&AST,&ALPHA 00009000 &VAL(1) SETA X'8000' 00010000 &VAL(2) SETA X'4000' 00011000 &VAL(3) SETA X'2000' 00012000 &VAL(4) SETA X'0800' 00013000 &VAL(5) SETA X'0400' 00014000 &VAL(6) SETA X'0200' 00015000 &VAL(7) SETA X'0100' 00016000 &VAL(8) SETA X'0080' 00017000 &ABBR(1) SETC 'PERF' @VA08717 00017100 &ABBR(2) SETC 'RESP' @VA08717 00017200 &ABBR(3) SETC 'SCH' @VA08717 00017300 &ABBR(4) SETC 'USER' @VA08717 00017400 &ABBR(5) SETC 'INST' @VA08717 00017500 &ABBR(6) SETC 'DAS' @VA08717 00017600 &ABBR(7) SETC 'SEEK' @VA08717 00017700 &ABBR(8) SETC 'SYS' @VA08717 00017800 &NOTN(1) SETC 'PERFORM' 00018000 &NOTN(2) SETC 'RESPONSE' @VA08365 00019100 &NOTN(3) SETC 'SCHEDULE' @VA08365 00020100 &NOTN(4) SETC 'USER' 00021000 &NOTN(5) SETC 'INSTSIM' 00022000 &NOTN(6) SETC 'DASTAP' 00023000 &NOTN(7) SETC 'SEEKS' 00024000 &NOTN(8) SETC 'SYSPROF' 00025000 ENTRY DMKSYSAT,DMKSYSTS,DMKSYSTE,DMKSYSMX,DMKSYSUR 00026000 ENTRY DMKSYSEN,DMKSYSCL,DMKSYSBF 00027000 AIF (N'&TIME EQ 1).LAB1A 00028000 AIF (N'&TIME NE 2).ERR1A 00029000 &NUM1 SETA K'&TIME(1) 00030000 &NUM2 SETA K'&TIME(2) 00031000 AGO .LAB2 00032000 .LAB1A ANOP 00033000 &K SETA K'&TIME 00034000 AIF ((&K NE 3) OR ('&TIME'(1,&K) NE 'ALL')).LAB1 00035000 DMKSYSTS DS 0D MONITOR AUTOMATIC START TIME 00036000 DC F'0' 00037000 DC F'0' 00038000 DMKSYSTE DC F'86400' MONITOR AUTOMATIC STOP TIME 00039000 DC F'0' 00040000 AGO .QSPL 00041000 .LAB1 ANOP 00042000 AIF ((&K NE 4) OR ('&TIME'(1,&K) NE 'NONE')).ERR2 00043000 DMKSYSTS DS 0F MONITOR AUTOMATIC START TIME 00044000 DC F'86400' 00045000 DC F'0' 00046000 DMKSYSTE DC F'86400' MONITOR AUTOMATIC STOP TIME 00047000 DC F'0' 00048000 AGO .QSPL 00049000 .LAB2 ANOP 00050000 &I SETA 1 00051000 .CUMP AIF ('&TIME(1)'(&I,1) EQ ':').CALC 00052000 &I SETA &I+1 00053000 AIF (&I GT K'&TIME(1)).ERR1 00054000 AGO .CUMP 00055000 .CALC ANOP 00056000 &I SETA &I-1 00057000 AIF (&I LE 0).ERR1 00058000 &J SETA 1 00059000 .RED1 AIF (&J GT &I).BRLP 00060000 AIF ('&TIME(1)'(&J,1) LT '0').E3 00061000 AIF ('&TIME(1)'(&J,1) GT '9').E3 00062000 &J SETA &J+1 00063000 AGO .RED1 00064000 .BRLP ANOP 00065000 &HS SETC '&TIME(1)'(1,&I) 00066000 &I SETA &I+2 00067000 &I1 SETA K'&TIME(1)-&I+1 00068000 AIF (&I1 LE 0).ERR1 00069000 &J SETA &I 00070000 .RED2 AIF (&J GT K'&TIME(1)).BRLP2 00071000 AIF ('&TIME(1)'(&J,1) LT '0').E3 00072000 AIF ('&TIME(1)'(&J,1) GT '9').E3 00073000 &J SETA &J+1 00074000 AGO .RED2 00075000 .BRLP2 ANOP 00076000 &MS SETC '&TIME(1)'(&I,&I1) 00077000 &I SETA 1 00078000 .CUMP1 AIF ('&TIME(2)'(&I,1) EQ ':').CALC2 00079000 &I SETA &I+1 00080000 AIF (&I GT K'&TIME(2)).ERR1 00081000 AGO .CUMP1 00082000 .CALC2 ANOP 00083000 &I SETA &I-1 00084000 AIF (&I LE 0).ERR1 00085000 &J SETA 1 00086000 .RED3 AIF (&J GT &I).BRLP3 00087000 AIF ('&TIME(2)'(&J,1) LT '0').E3 00088000 AIF ('&TIME(2)'(&J,1) GT '9').E3 00089000 &J SETA &J+1 00090000 AGO .RED3 00091000 .BRLP3 ANOP 00092000 &HE SETC '&TIME(2)'(1,&I) 00093000 &I SETA &I+2 00094000 &I1 SETA K'&TIME(2)-&I+1 00095000 AIF (&I1 LE 0).ERR1 00096000 &J SETA &I 00097000 .RED4 AIF (&J GT K'&TIME(2)).BRLP4 00098000 AIF ('&TIME(2)'(&J,1) LT '0').E3 00099000 AIF ('&TIME(2)'(&J,1) GT '9').E3 00100000 &J SETA &J+1 00101000 AGO .RED4 00102000 .BRLP4 ANOP 00103000 &ME SETC '&TIME(2)'(&I,&I1) 00104000 &NUM SETA &HS 00105000 &NUMMS SETA &MS 00106000 &NUM1 SETA &HE 00107000 &NUMME SETA &ME 00108000 AIF ((&NUM GT 24) OR (&NUM1 GT 24) OR (&NUM GT &NUM1)).E3 00109000 AIF ((&NUMMS GT 60) OR (&NUMME GT 60)).E3 00110000 &NUM SETA &NUM*60*60+&NUMMS*60 00111000 &NUM1 SETA &NUM1*60*60+&NUMME*60 00112000 AIF (&NUM GE &NUM1).E3 00113000 DMKSYSTS DS 0D MONITOR AUTOMATIC START TIME 00114000 DC F'&NUM' 00115000 DC F'0' 00116000 DMKSYSTE DS 0D MONITOR AUTOMATIC STOP TIME 00117000 DC F'&NUM1' 00118000 DC F'0' 00119000 .QSPL ANOP 00120000 AIF (N'&LIMIT NE 2).ERR4 00121000 &K SETA K'&LIMIT(1) 00122000 &I SETA 1 00123000 .LOP1 AIF ('&LIMIT(1)'(&I,1) LT '0').E4 00124000 AIF ('&LIMIT(1)'(&I,1) GT '9').E4 00125000 &I SETA &I+1 00126000 AIF (&I LE &K).LOP1 00127000 &RS SETC '&LIMIT(1)'(1,&K) 00128000 &NUM SETA &RS 00129000 AIF ((&NUM LT 10) OR (&NUM GT 50000)).ERR5 00130000 DMKSYSMX DC F'&NUM' MONITOR SPOOL FILE RECORD LIMIT 00131000 &K SETA K'&LIMIT(2) 00132000 AIF ('&LIMIT(2)' NE 'NOSTOP').LAB3A @V60BEBC 00133000 &AUTST SETA X'40' @V60BEBC 00133100 AGO .LAB3 @V60BEBC 00133200 .LAB3A AIF ('&LIMIT(2)' NE 'SAMPLE').LAB3B @V60BEBC 00133300 &AUTST SETA X'60' @V60BEBC 00133400 AGO .LAB3 @V60BEBC 00133500 .LAB3B AIF ('&LIMIT(2)' NE 'STOP').ERR6A @V60BEBC 00133600 &AUTST SETA X'00' 00137000 .LAB3 ANOP 00138000 &K SETA K'&BUFFS 00139000 AIF ('&BUFFS'(1,&K) EQ 'CPU').SKIP @VA08356 00139500 AIF (&K NE 0).NODFLT 00140000 .SKIP ANOP 00140500 DMKSYSBF DC H'0' DEFAULT MONITOR BUFFERS 0 00141000 AGO .STRTEN 00142000 .NODFLT ANOP 00143000 &RS SETC '&BUFFS'(1,&K) 00144000 &NUM SETA &RS 00145000 AIF (&NUM GT 10).BIGBUF 00146000 DMKSYSBF DC H'&NUM' NUMBER OF MONITOR BUFFERS 00147000 .STRTEN ANOP 00148000 &EN SETA 0 00149000 &K SETA N'&ENABLE 00150000 AIF (&K GT 8).ERR10 00151000 &NUM SETA 1 00152000 .COMP AIF (&NUM GT &K).SETEN 00153000 &NUM1 SETA 1 00154000 .L1 AIF (&NUM1 GT 8).ERR11 00155100 AIF ('&ENABLE(&NUM)' NE '&NOTN(&NUM1)').GETNXT 00156000 .EQUAL ANOP 00156100 AIF (&VAL(&NUM1) EQ 0).ERR12 @VA09888 00157100 &EN SETA &EN+&VAL(&NUM1) 00158000 &VAL(&NUM1) SETA 0 00159000 AGO .NXTPARM 00160000 .GETNXT ANOP 00161000 AIF ('&ENABLE(&NUM)' EQ '&ABBR(&NUM1)').EQUAL @VA08717 00161100 &NUM1 SETA &NUM1+1 00162000 AGO .L1 00163000 .NXTPARM ANOP 00164000 &NUM SETA &NUM+1 00165000 AGO .COMP 00166000 .SETEN ANOP 00167000 &ENC SETC '' 00168000 .LOP3 ANOP 00169000 &DEC SETA &EN-&EN/16*16 00170000 &HEX SETC '0123456789ABCDEF'(&DEC+1,1) 00171000 &ENC SETC '&HEX&ENC' 00172000 &EN SETA &EN/16 00173000 AIF (&EN GT 0).LOP3 00174000 DMKSYSEN DC XL2'&ENC' MONITOR CLASS ENABLE MASK 00175000 &K SETA K'&AUTO 00176000 AIF (&K EQ 0).ERR5 00177000 &AUT SETC '&AUTO'(1,&K) 00178000 AIF ((&K EQ 3) AND ('&AUT' EQ 'YES')).AUTOYES 00179000 AIF ((&K EQ 2) AND ('&AUT' EQ 'NO')).AUTONO 00180000 AGO .ERR7 00181000 .AUTOYES ANOP 00182000 &AUTST SETA X'80'+&AUTST 00183000 AGO .PUTAUT 00184000 .AUTONO ANOP 00185000 &AUTST SETA X'00'+&AUTST 00186000 .PUTAUT ANOP 00187000 &AST SETC '' 00188000 .LOP4 ANOP 00189000 &DEC SETA &AUTST-&AUTST/16*16 00190000 &HEX SETC '0123456789ABCDEF'(&DEC+1,1) 00191000 &AST SETC '&HEX&AST' 00192000 &AUTST SETA &AUTST/16 00193000 AIF (&AUTST GT 0).LOP4 00194000 DMKSYSAT DC XL1'&AST' AUTOMATIC MONITORING FLAG 00195000 .GETUSR ANOP 00196000 &K SETA K'&USERID 00197000 AIF (&K GT 8).ERR8 00198000 DMKSYSUR DC CL8'&USERID' SPOOL FILE DESTINATION USERID 00199000 &ALPHA SETC 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 00200000 &K SETA K'&CLASS 00201000 AIF ((&K EQ 0) OR (&K GT 1)).ERR13 00202000 &I SETA 1 00203000 .LOP5 AIF (&I GT 26).ERR14 00204000 AIF ('&CLASS' EQ '&ALPHA'(&I,1)).CLASSOK 00205000 &I SETA &I+1 00206000 AGO .LOP5 00207000 .CLASSOK ANOP 00208000 DMKSYSCL DC CL1'&CLASS' SPOOL FILE CLASS 00209000 MEXIT 00210000 .ERR1 MNOTE 8,'NO TIME PARAMETER SPECIFIED' 00211000 MEXIT 00212000 .ERR1A MNOTE 8,'TWO TIME PARAMETERS REQUIRED' 00213000 MEXIT 00214000 .ERR2 MNOTE 8,'ILLEGAL TIME PARAMETER' 00215000 MEXIT 00216000 .E3 MNOTE 8,'ILLEGAL NUMERICAL PARAMETER FOR TIME' 00217000 MEXIT 00218000 .ERR4 MNOTE 8,'TWO PARAMETERS ARE REQUIRED FOR SPLMAX' 00219000 MEXIT 00220000 .E4 MNOTE 8,'NO SPOOL MAXIMUM SPECIFIED' 00221000 MEXIT 00222000 .ERR5 MNOTE 8,'ILLEGAL NUMBER SPECIFIED FOR MAXIMUM' 00223000 MEXIT 00224000 .ERR5A MNOTE 8,'START TIME IS GREATER THAN OR EQUAL TO STOP TIME' 00225000 MEXIT 00226000 .ERR6 MNOTE 8,'NO AUTO PARAMETER SPECIFIED' 00227000 MEXIT 00228000 .ERR6A MNOTE 8,'SECOND PARAMETER OF SPLMAX IS IN ERROR' 00229000 MEXIT 00230000 .ERR7 MNOTE 8,'ILLEGAL AUTO PARAMETER' 00231000 MEXIT 00232000 .ERR8 MNOTE 8,'ILLEGAL USERID LENGTH' 00233000 MEXIT 00234000 .ERR10 MNOTE 8,'TOO MANY ENABLE CLASSES SPECIFIED' 00235000 MEXIT 00236000 .ERR11 MNOTE 8,'ILLEGAL ENABLE PARM SPECIFIED' 00237000 MEXIT 00238000 .ERR12 MNOTE 8,'DUPLICATE ENABLE PARM SPECIFIED' 00239000 MEXIT 00240000 .ERR13 MNOTE 8,'EITHER NO CLASS SPECIFIED, NOT ONE CHARACTER' 00241000 MEXIT 00242000 .ERR14 MNOTE 8,'ILLEGAL CHARACTER FOR CLASS' 00243000 MEXIT 00244000 .ERR15 MNOTE 8,'TOO MANY CHARACTERS FOR FNAME, 24 OR LESS' 00245000 MEXIT 00246000 .ERR16 MNOTE 8,'NAME NEEDS EXACTLY TWO PARAMETERS' 00247000 MEXIT 00248000 .ERR17 MNOTE 8,'A PARAMETER CAN HAVE AT MOST 8 CHARACTERS' 00249000 MEXIT 00250000 .BIGBUF MNOTE 8,'ILLEGAL TO SPECIFY OVER 10 BUFFERS' 00251000 MEND 00252000