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

INHOQR.m

Go to the documentation of this file.
  1. INHOQR ; FRW/JMB ; 24 Aug 95 14:10; Show GIS queue status
  1. ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
  1. ;COPYRIGHT 1991-2000 SAIC
  1. ;
  1. EN ;Main entry point
  1. ;NEW statements
  1. ;
  1. N %,%ZIS,Q,POP,INTASKED,INPAR
  1. N ZTDESC,ZTIO,ZTRTN,ZTSAVE
  1. ;
  1. ;Get report parameters
  1. Q:'$$PAR
  1. ;
  1. ;Background flag
  1. S INTASKED=0
  1. ;Get device
  1. W ! K IOP S %ZIS("A")="QUEUE ON DEVICE: ",%ZIS("B")="",%ZIS="NQ" D ^%ZIS G:POP EXIT^INHOQR1
  1. S IOP=ION_";"_IOST_";"_IOM_";"_IOSL
  1. ;User did not select their own device, force queue to taskman
  1. I IO=IO(0) S %ZIS="" D ^%ZIS I POP W *7,!,"Sorry, unable to find device..." G EXIT^INHOQR1
  1. I IO'=IO(0) D G EXIT^INHOQR1
  1. . S INTASKED=1,ZTDESC="GIS Queue Status",ZTIO=IOP,ZTRTN="ENZTSK^INHOQR1"
  1. . F X="INPAR(","INTASKED" S ZTSAVE(X)=""
  1. . D ^%ZTLOAD
  1. ;
  1. ;Go to compilation and display module
  1. G ENZTSK^INHOQR1
  1. ;
  1. Q
  1. ;
  1. PAR() ;User parameters
  1. ;OUTPUT:
  1. ; INPAR - array of report parameters
  1. ; function - user did not abort ( 0 - no ; 1 - yes )
  1. ;
  1. K INPAR
  1. S INPAR("DETAIL")=1 ;detailed report
  1. S INPAR("REPAINT")=5 ;repaint frequency
  1. S INPAR("RUNTOEND")=0 ;always run to end of queues
  1. S INPAR("MAXREPTIME")=1800 ;max time to spend in one rpeort scan
  1. S INPAR("MAXQTIME")=INPAR("MAXREPTIME") ;max time to spend scanning a queue
  1. S INPAR("ITER")=100 ;number of report scans to run (printer)
  1. S INPAR("FUTURE")=0 ;report future tasks
  1. ;S INPAR("GRAPH")=0 ;single graph output
  1. ;
  1. ;Quit if user accepts default paramters
  1. S %=$$RD^INHUTS1("Modify default paramters") Q:'% %'=U W !
  1. S INPAR("DETAIL")=$$RD^INHUTS1("Detailed report",INPAR("DETAIL")) Q:INPAR("DETAIL")=U 0
  1. S INPAR("REPAINT")=$$RD^INHUTS1("Repaint Frequency (sec)",INPAR("REPAINT"),"0,3600") Q:INPAR("REPAINT")=U 0
  1. S INPAR("FUTURE")=$$RD^INHUTS1("Include future tasks") Q:INPAR("FUTURE")=U 0
  1. S INPAR("RUNTOEND")=$$RD^INHUTS1("Always scan to end of queue") Q:INPAR("RUNTOEND")=U 0
  1. I 'INPAR("RUNTOEND") D Q:INPAR("MAXREPTIME")=U 0
  1. . S INPAR("MAXREPTIME")=$$RD^INHUTS1("Maximum time to spend compiling report (sec)",INPAR("MAXREPTIME"),"0,99999")
  1. S INPAR("MAXQTIME")=INPAR("MAXREPTIME")
  1. ;S INPAR("GRAPH")=$$RD^INHUTS1("Graph output") Q:INPAR("GRAPH")=U 0
  1. S INPAR("ITER")=$$RD^INHUTS1("Maximum number of iterations (printer only)",INPAR("ITER"),"0,9999") Q:INPAR("ITER")=U 0
  1. Q 1
  1. ;
  1. INIARR ;Initialize data and queue arrays
  1. ;OUTPUT:
  1. ; INDAT - array of data for each queue
  1. ; INDEST - array of queues to check
  1. ;
  1. N INQ,BP
  1. K INDAT
  1. ;Detemine destinations queues to check
  1. D DES1^INHUTS1
  1. ;Intialize data arrays
  1. F INQ=1,2,400,700,750 D DATINIT(INQ)
  1. S BP=0 F S BP=$O(INDEST(BP)) Q:'BP D DATINIT(BP)
  1. ;
  1. Q
  1. ;
  1. DATINIT(INQ) ;Initialize data array
  1. ;INPUT:
  1. ; INQ - queue entry (ien in Back Proc Control file)
  1. ;OUTPUT:
  1. ; INDAT - array of initialized data for a queue
  1. ;
  1. N X
  1. F X="COUNT","MIN","MAX","AVG","NAME","ITER","TOTC" S INDAT(INQ,X)=""
  1. Q