         SYSTEM   SIG7
         SYSTEM   BPM
         TITLE    ' SUMMARY - UTS PERFORMANCE ANALYSIS, META PORTION'
         DEF      READSN,READSS,NEWLIN
         DEF      CPROM,SPROM
         DEF      PRTDO,PRTLO
         DEF      READT
         REF      M:SI,M:DO,M:LO
STOT     EQU      231
RETURN   EQU      15
R1       EQU      1                 REGISTER 1
R2       EQU      2                 REGISTER 2
R3       EQU      3
R4       EQU      4
R8       EQU      8                 REGISTER 8
R10      EQU      10                REGISTER 10
NORM     EQU      2
         PAGE
RESERVE  CNAME
         PROC
         DISP     %
         LIST     0
LF(1)    DO1      AF(1)
         DATA     0
         LIST     1
         PEND
         PAGE
SUMDCB   CSECT    1
READT    LI,R1    30
         LW,R2    ='    '
         STW,R2   IANS-1,R1
         BDR,R1   %-1
         MTW,0    LVFC
         BNEZ     %+4
         M:DEVICE M:LO,(VFC)
         M:DEVICE M:DO,(VFC)
         MTW,1    LVFC
         M:READ   M:SI,(BUF,IANS),(SIZE,80),(WAIT)
         MTW,1    LCOUNT
         LW,R1    LCOUNT
         CI,R1    1
         BG       SNAME3
         LW,R1    IANS              TEST FIRST FOUR CHAR
         CW,R1    =' SUM'           IS THIS THE CONTROL CARD
         BE       READT             READ ANOTHER CARD
*        IF M:SI IS A FILE,ECHO M:SI VIA M:DO
SNAME3   LW,R3    M:SI
         AND,R3   =X'00000007'
         CI,R3    1
         BNE      *RETURN
         M:DEVICE M:DO,(NOVFC)
         M:WRITE  M:DO,(BUF,IANS),(SIZE,80),(BTD,0)
         M:DEVICE M:DO,(VFC)
         LI,R1    NORM
         STW,R1   ISTAT
         B        *RETURN
         PAGE
PRTLO    M:DEVICE M:LO,(VFC)
         M:WRITE  M:LO,(BUF,IANS),(SIZE,120),;
                  (ERR,ERRT),(ABN,ERRT)
         LI,R1    NORM
         STW,R1   ISTAT
         B        *RETURN
PRTDO    MTW,0    LVFC
         BNEZ     %+4
         M:DEVICE M:LO,(VFC)
         M:DEVICE M:DO,(VFC)
         MTW,1    LVFC
         M:WRITE  M:DO,(BUF,IANS),(SIZE,120),;
                  (ERR,ERRT),(ABN,ERRT)
         LI,R1    NORM
         STW,R1   ISTAT
         B        *RETURN
READSN   M:READ   F:2,(BUF,BUFFER),;
                  (ERR,ERSN),(ABN,ERSN)
         LI,R1    NORM
         STW,R1   ISTAT
         B        *RETURN
ERSN     EQU      %
         LB,R1    R10               LOAD ERROR RETURN
         CI,R1    X'06'             EOF ENCOUNTERED
         BNE      %+5
         M:CLOSE  F:2
         LI,1     3
         STW,1    ISTAT
         B        *RETURN
         LI,1     4
         STW,1    ISTAT
         B        *RETURN
ERSS     EQU      %
         LB,R1    R10               LOAD ERROR RETURN
         CI,R1    X'06'             EOF ENCOUNTERED
         BNE      %+5
         M:CLOSE  F:3
         LI,1     3
         STW,1    ISTAT
         B        *RETURN
         LI,1     4
         STW,1    ISTAT
         B        *RETURN
ERRT     EQU      %
         LB,R1    R10               LOAD ERROR RETURN
         CI,R1    X'06'             EOF ENCOUNTERED
         BNE      %+4
         LI,1     3
         STW,1    ISTAT
         B        *RETURN
         LI,1     4
         STW,1    ISTAT
         B        *RETURN
READSS   M:READ   F:3,(BUF,BUFFER),;
                  (ERR,ERSS),(ABN,ERSS)
         LI,R1    NORM
         STW,R1   ISTAT
         B        *RETURN
NEWLIN   M:DEVICE M:LO,(NLINES)
         STW,R8   LINES
         B        *RETURN
CPROM    M:PC     '-'               COMMAND LEVEL PROMPT
         B        *RETURN
SPROM    M:PC     '>'               SUBCOMMAND LEVEL PROMPT
         B        *RETURN
SUMDAT   CSECT    0
LCOUNT   DATA     0                 SI LINE COUNT
LVFC     DATA     0                 ONE SHOT VFC SETUP
         PAGE
LINES    DSECT    0
         DATA     0
ISTAT    DSECT    0
         DATA     0
BUFFER   DSECT    0
         RESERVE  STOT
IANS     DSECT    0
         RESERVE  30
         PAGE
F:2      DSECT    1                 CHRONOLOGICAL SNAPSHOT FILE
F:2      M:DCB    (FILE,'SNAPSHOT'),(PASS),(RECL,4*STOT),;
                  (CONSEC),(SEQUEN),(IN),(INSN)
         PAGE
F:3      DSECT    1                 SORTED SNAPSHOT FILE
F:3      M:DCB    (FILE,'SSNAPSHOT'),(PASS),(RECL,4*STOT),;
                  (KEYED),(SEQUEN),(IN),(INSN)
         USECT    SUMDCB
         END

