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

INHVA8.m

Go to the documentation of this file.
  1. INHVA8 ;FRW ; 11 Feb 93 12:33; Identify missing interface transactions
  1. ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
  1. ;COPYRIGHT 1991-2000 SAIC
  1. EN ;Main entry point
  1. ;NEW statements
  1. N %ZIS,A,COUNT,DATA,EXIT,HDR,LOOP,PAGE,X,ZTDESC,ZTIO,ZTRTN,ZTSAVE
  1. S U="^"
  1. ENUSE ;User input
  1. ;ask for prefix
  1. S INPRE=$$SOC^UTIL("Select message prefix: ","","SAIC^DHCP",0)
  1. ;goto QUIT if user aborts
  1. G:INPRE[U!('$L(INPRE)) QUIT
  1. ;Device handling & Tasking logic
  1. K IOP S %ZIS("A")="QUEUE ON DEVICE: ",%ZIS("B")="",%ZIS="NQ" D ^%ZIS G:POP QUIT
  1. S IOP=ION_";"_IOST_";"_IOM_";"_IOSL
  1. I IO=IO(0) S %ZIS="" D ^%ZIS I POP W *7,!,"Sorry, unable to find device..." G QUIT
  1. I IO'=IO(0) S ZTDESC="Identify missing interface transactions",ZTIO=IOP,ZTRTN="ENQUE^INHVA8" D G QUIT
  1. .F X="U","IO*","D*","INPRE" S ZTSAVE(X)=""
  1. .D ^%ZTLOAD
  1. ;
  1. ENQUE ;Taskman entry point
  1. ;initialize variables
  1. S PAGE=0,EXIT=0
  1. D HSET,HEADER
  1. ;call modules
  1. S CUR=0,LAST=CUR,MES=INPRE_CUR,COUNT=0,INPREL=$L(INPRE)
  1. F CMES=1:1 S LAST=CUR,MES=$O(^INTHU("C",MES)) Q:$E(MES,1,INPREL)'=INPRE!(EXIT) S CUR=$E(MES,INPREL+1,999) I (LAST+1)'=CUR S DATA="LAST,?12,CUR" D WRITE S COUNT=COUNT+1
  1. ;
  1. S DATA="!!,""Total Gaps => "",COUNT,!,""Total Messages => "",CMES"
  1. G QUIT
  1. ;
  1. N A
  1. I ($P(IOST,"-")["C")&('$D(IO("Q")))&(IO=IO(0))&(PAGE>0) R !,"Press <RETURN> to continue ",A:DTIME I A[U S EXIT=1 Q
  1. S PAGE=PAGE+1 W @IOF
  1. S A=0 F S A=$O(HDR(A)) Q:'A U IO W !,@HDR(A)
  1. Q
  1. ;
  1. WRITE ;output a line
  1. I ($Y>(IOSL-3))&(PAGE>0) D HEADER
  1. Q:EXIT W !,@DATA Q
  1. ;
  1. HSET ;set up header
  1. K HDR
  1. D NOW^%DTC S Y=% D DD^%DT S HDR(1)="?(IOM-30),"""_$P(Y,":",1,2)_""",?(IOM-10),""PAGE: "",PAGE"
  1. S HDR(3)="""Missing Interface Transaction with the prefix: "",INPRE"
  1. S HDR(3.5)="""Before Gap After Gap"""
  1. S HDR(4)="",$P(HDR(4),"-",IOM-1)="",HDR(4)=""""_HDR(4)_""",!"
  1. Q
  1. ;
  1. QUIT ;exit module
  1. D ^%ZISC
  1. S IOP="",%ZIS="" D ^%ZIS U IO K IO("Q"),IOP,POP
  1. Q