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

TIUDEV.m

Go to the documentation of this file.
TIUDEV ; SLC/JER - Device Handling Utilities ;6/19/98@16:24:11
 ;;1.0;TEXT INTEGRATION UTILITIES;**1,20**;Jun 20, 1997
DEVICE(IO,TIUDEV,TIUZIS,TIUSCR,TIUIOP) ; Calls to Device Handler
 N %I,%T,%Y,POP,%ZIS,IOP
 I $G(TIUDEV)="LAST" S TIUDEV=$$LAST
 S:$D(TIUDEV) %ZIS("B")=TIUDEV
 S:$G(TIUSCR)]"" %ZIS("S")=TIUSCR
 S:$D(TIUIOP) IOP=TIUIOP
 S %ZIS=$G(TIUZIS,"Q") D ^%ZIS
 I +$G(POP) S ION="" W !,$C(7),"TRY LATER"
 Q ION
QUE(ZTRTN,ZTIO) ; Queue output
 N %,ZTDTH,ZTSAVE,ZTSK
 Q:'$D(ZTRTN)  K IO("Q"),ZTSAVE
 F %="DA","DFN","TIU*","VALM*","^TMP(""TIURIDX"",$J," S ZTSAVE(%)=""
 F %="OR*","^TMP(""OR"",$J," S ZTSAVE(%)=""
 S:'$D(ZTDESC) ZTDESC="PRINT DOCUMENTS"
 D ^%ZTLOAD W !,$S($D(ZTSK):"Request Queued!",1:"Request Cancelled!")
 K ZTSK,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE D ^%ZISC
 S IOP="HOME" D ^%ZIS
 Q
LAST() ; Get last device
 N TIUDIEN,TIUDNM
 S TIUDIEN=$G(^DISV(DUZ,"^%ZIS(1,"))
 I +TIUDIEN'>0 S TIUDNM="" G LASTX
 I $L($G(^%ZIS(1,+TIUDIEN,"TYPE"))),(";HFS;MT;BAR;VTRM;RES;CHAN;IMPC;"[(";"_^("TYPE")_";")) S TIUDNM="" G LASTX
 S TIUDNM=$P($G(^%ZIS(1,TIUDIEN,0)),U)
LASTX Q $G(TIUDNM)