ACGSZIS ;IHS/OIRM/DSD/THL,AEF - %ZIS AND ZTLOAD UTILITY; [ 03/27/2000 2:22 PM ]
;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
;;UTILITY TO CONTROL ALL %ZIS AND %ZTLOAD CALLS FOR CIS
ZIS S %ZIS="NPMQ",ZIBH=$TR($H,",","")_$R(1000)
W !
K IOP,ACGQUIT
D ^%ZIS
G:POP DONE
S:ION["HOST" %ZIS("IOPAR")=IOPAR,ZTSAVE("%IS*")=""
I IO=IO(0),$D(IO("Q")) W !,"Cannot Queue to Screen or Slave Printer!",! K IO("Q") G ZIS
S (ACGION,ACGIOP)=ION
I ION["HOST" S ACGIOPAR=IOPAR S:$D(IO("HFSIO")) ACGIO("HFSIO")=IO("HFSIO")
I $D(IO("Q")) D ZTLOAD S ACGQUIT=""
Q
ZTLOAD F X="ACG*","DIOEND","FLDS","DIC","BY","FR","TO","DIS*" S ZTSAVE(X)=""
S ZTIO=ION
D ^%ZTLOAD
W !,"REQUEST QUEUED!"
K ZTSK
DONE ;EP;TO CLOSE DEVICE
D:'$D(ZTQUEUED) ^%ZISC
S ACGQUIT=""
Q
ACGSZIS ;IHS/OIRM/DSD/THL,AEF - %ZIS AND ZTLOAD UTILITY; [ 03/27/2000 2:22 PM ]
+1 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
+2 ;;UTILITY TO CONTROL ALL %ZIS AND %ZTLOAD CALLS FOR CIS
ZIS SET %ZIS="NPMQ"
SET ZIBH=$TRANSLATE($HOROLOG,",","")_$RANDOM(1000)
+1 WRITE !
+2 KILL IOP,ACGQUIT
+3 DO ^%ZIS
+4 IF POP
GOTO DONE
+5 IF ION["HOST"
SET %ZIS("IOPAR")=IOPAR
SET ZTSAVE("%IS*")=""
+6 IF IO=IO(0)
IF $DATA(IO("Q"))
WRITE !,"Cannot Queue to Screen or Slave Printer!",!
KILL IO("Q")
GOTO ZIS
+7 SET (ACGION,ACGIOP)=ION
+8 IF ION["HOST"
SET ACGIOPAR=IOPAR
IF $DATA(IO("HFSIO"))
SET ACGIO("HFSIO")=IO("HFSIO")
+9 IF $DATA(IO("Q"))
DO ZTLOAD
SET ACGQUIT=""
+10 QUIT
ZTLOAD FOR X="ACG*","DIOEND","FLDS","DIC","BY","FR","TO","DIS*"
SET ZTSAVE(X)=""
+1 SET ZTIO=ION
+2 DO ^%ZTLOAD
+3 WRITE !,"REQUEST QUEUED!"
+4 KILL ZTSK
DONE ;EP;TO CLOSE DEVICE
+1 IF '$DATA(ZTQUEUED)
DO ^%ZISC
+2 SET ACGQUIT=""
+3 QUIT