Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: INHOV2

INHOV2.m

Go to the documentation of this file.
  1. INHOV2 ;JMB; 6 Jul 99 15:28;Verify Background Processes
  1. ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
  1. ;COPYRIGHT 1991-2000 SAIC
  1. Q
  1. ;
  1. IN1(INI) ;Initialize Servers for process INI
  1. ;OUTPUT
  1. ; Initialized INDAT array
  1. ;
  1. N INK
  1. S INK=0 F S INK=$O(INDAT(INI,INK)) Q:'INK D
  1. . S INDAT(INI,INK,"RUN")="N"
  1. Q
  1. ;
  1. IN2(INI) ;Handle tasked/non-tasked stats
  1. ;OUTPUT
  1. ; updated INDAT array for process INI
  1. ;
  1. N INK,INT
  1. Q:INTASKED
  1. S INK="" F S INK=$O(INDAT(INI,INK)) Q:'$L(INK) D
  1. .;main process - show process name and run status even if not running.
  1. .I INK=0 S INT=INDAT(INI,INK,"RUN") I INT="N" K INDAT(INI,INK) S INDAT(INI,INK,"RUN")="N"
  1. .;servers (INK>0), do not display them if not running.
  1. .E K:INDAT(INI,INK,"RUN")="N" INDAT(INI,INK)
  1. Q
  1. ;
  1. DIS ;Display Report
  1. D HD
  1. ;Display data
  1. S INQ="" F S INQ=$O(INDAT(INQ)) Q:'INQ D OV(INQ,0) S INK="" F S INK=$O(INDAT(INQ,INK)) Q:'$L(INK) D
  1. .W !,?1,INDAT(INQ,INK,"RUN")
  1. .W:'INK ?TAB(1),$E(INDEST(INQ),1,30)
  1. .W:INK>0 ?TAB(1)+2,"SERVER",INK
  1. .;Display Last Run Update Stats
  1. .D DIS1(0)
  1. .W:$L($G(INDAT(INQ,INK,"MES"))) !,?TAB(1)+2,$E(INDAT(INQ,INK,"MES"),1,30)
  1. .;Display Last Event Stats
  1. .D DIS1(1)
  1. .D:$L($O(INDAT(INQ,INK))) OV(INQ,1)
  1. D FTR
  1. Q
  1. ;
  1. DIS1(DA) ;Display Stats
  1. ;INPUT: DA = 0 - Last Run Update Stats
  1. ; 1 - Last Event Stats
  1. ;
  1. I DA=1,'$L($G(INDAT(INQ,INK,1,"ELS"))) Q
  1. I DA=1,'$L($G(INDAT(INQ,INK,"MES"))) W !
  1. W ?TAB(2),$J($$FT0^INHUTS($G(INDAT(INQ,INK,DA,"LRU"))),10)
  1. W ?TAB(3),$J($$FT1^INHUTS($G(INDAT(INQ,INK,DA,"ELS")),1),7)
  1. W ?TAB(4),$J($$FT1^INHUTS($G(INDAT(INQ,INK,DA,"MIN")),2),6)
  1. W ?TAB(5),$J($$FT1^INHUTS($G(INDAT(INQ,INK,DA,"MAX")),2),6)
  1. W ?TAB(6),$J($$FT1^INHUTS($G(INDAT(INQ,INK,DA,"AET")),2),6)
  1. Q
  1. ;
  1. OV(INQ,IN1) ;Handle overflow
  1. ;INPUT
  1. ; INQ - Process Id
  1. ; IN1 - 1 Repeat process name
  1. ; - 0 Do not repeat process name
  1. Q:$Y<(IOSL-4)
  1. W !!,"More..." F X=1:1:INPAR("REPAINT") Q:INTASKED R *%:1 Q:$T
  1. D HD
  1. ;Repeat process name
  1. W:IN1 !,INDEST(INQ)," Cont."
  1. Q
  1. ;
  1. HD ;Display header
  1. ;Clear screen
  1. N SEL
  1. W @IOF
  1. W "Verify Background Process",?55,INDAT("CT")
  1. D HD1
  1. W !,?5,"Start Time: ",INDAT("ST")
  1. W ?40," Number of Iterations: ",INITER
  1. W !,?5," Run Time: ",INDAT("RT"),?40,"Avg Time per Iteration: ",INDAT("AR")
  1. W !!
  1. S SEL=$S(INPAR("DETAIL"):"DET",1:"BRF") D @SEL
  1. W !,"---"
  1. W ?TAB(1),"------------------------------",?TAB(2),"----------"
  1. W ?TAB(3),"-------"
  1. F X=TAB(4),TAB(5),TAB(6) W ?X,"------"
  1. Q
  1. DET ;Detail Report Header
  1. W "Run",?TAB(1),"Background Process/",?TAB(2),"Last Run/"
  1. W ?TAB(3)+6,"(defaults in seconds)"
  1. W !,?TAB(1)+2,"Message",?TAB(2)," Last Msg",?TAB(3),"Elapsed"
  1. W ?TAB(4)," Min",?TAB(5)," Max",?TAB(6)," Avg"
  1. Q
  1. BRF ;Brief Report Header
  1. W ?TAB(3)+6,"(defaults in seconds)",!
  1. W "Run",?TAB(1),"Background Process",?TAB(2),"Last Run"
  1. W ?TAB(3),"Elapsed"
  1. W ?TAB(4)," Min",?TAB(5)," Max",?TAB(6)," Avg"
  1. Q
  1. ;
  1. FTR ;Display footer
  1. ;
  1. ;Diplay legend if at least one process has RUN status equal to "Q".
  1. W:INSIG !!,"NOTE: RUN=Q Stands for ""Background Process Signaled to Quit"""
  1. Q:INTASKED
  1. W !!,"Press any key to exit: "
  1. Q
  1. HD1 ;Display warning message
  1. Q:'INWARN
  1. W !,"WARNING: Report being run elsewhere. Results may not be accurate."
  1. Q