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

INHOQT.m

Go to the documentation of this file.
  1. INHOQT ; FRW/JMB ; 24 Aug 95 13:29; Show top entries in queues
  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. N %,INPAR,PROMPT,DEF,RANGE,INTASKED
  1. ;
  1. S INTASKED=0 ;report only to be displayed
  1. ;Get report parameters
  1. Q:'$$PAR
  1. ;
  1. G EN^INHOQT1
  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 ;detail report
  1. S INPAR("REPAINT")=5 ;repaint frequency
  1. S INPAR("ITERT")=5 ;number of times to try and get an entry
  1. ;
  1. ;Quit if user accepts default parameters
  1. S %=$$RD("Modify default parameters") Q:'% %'=U W !
  1. S INPAR("DETAIL")=$$RD("Detailed report",INPAR("DETAIL")) Q:INPAR("DETAIL")=U 0
  1. S INPAR("REPAINT")=$$RD("Repaint Frequency (sec)",INPAR("REPAINT"),"0,3600") Q:INPAR("REPAINT")=U 0
  1. S INPAR("ITERT")=$$RD("Maximum number of times to try for an entry",INPAR("ITERT"),"0,9999") Q:INPAR("ITERT")=U 0
  1. Q 1
  1. ;
  1. RD(PROMPT,DEF,RANGE) ;Read a parameter
  1. Q $$RD^INHUTS1($G(PROMPT),$G(DEF),$G(RANGE))
  1. ;
  1. INIARR ;Initialize data and queue arrays
  1. ;OUTPUT:
  1. ; INDEST - array destination queues to check
  1. ; INDAT
  1. ;
  1. N INQ
  1. K INDAT
  1. ;Determine INDEST
  1. D DES1^INHUTS1
  1. ;Write queue names in INDAT
  1. F BP=1,2 D DATINIT(BP)
  1. S BP=0 F S BP=$O(INDEST(BP)) Q:'BP D DATINIT(BP)
  1. Q
  1. ;
  1. DATINIT(INQ) ;Initialize INDAT
  1. ;INPUT
  1. ; INQ - Process Id number
  1. ;OUTPUT
  1. ; INDAT
  1. ;
  1. S INDAT(INQ,"NAME")=$P($G(^INTHPC(INQ,0)),U)
  1. Q