source: FOIAVistA/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUPSUTQ.m@ 794

Last change on this file since 794 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.0 KB
Line 
1XUPSUTQ ;EDS/GRR - QUEUEING UTILITY (%ZTLOAD) ; 16-JUL-03
2 ;;8.0;KERNEL;**309**;Jul 10, 1995
3 ;
4Q1 S ZTDTH=$H
5QUE K IO("Q") I '$D(ZTIO),$D(ION),ION="" S ZTIO=""
6 I '$D(ZTDESC) S ZTDESC=$S($D(XUPSPGM):XUPSPGM,$D(PGM):PGM,1:"KERNEL UNKNOWN OPTION")
7 I '$D(ZTRTN) S ZTRTN=$S($D(XUPSPGM):XUPSPGM,$D(PGM):PGM,1:"") G:XUPSPGM="" CLOSE S ZTRTN="DQ^XUPSUTQ"
8 I $D(XUPSPGM),'$D(ZTLOAD(XUPSPGM)) S ZTSAVE("XUPSPGM")=""
9LOAD D ^%ZTLOAD W !!,$S($D(ZTSK):"Request Queued!",1:"Request Cancelled!") S:'$D(ZTSK) X="^" S:$D(ZTSK) X="" G CLOSE:$D(ZTSK),END
10 Q
11ZIS W ! K IOP,IO("Q") S POP=0,%ZIS="QMP" D ^%ZIS K %ZIS,IOP Q:POP I $D(IO("Q")) D QUE S POP=1 G CLOSE
12 U IO
13 Q
14CLOSE Q:$D(ZTQUEUED) N POP D ^%ZISC
15END K ZTSK,ZTDESC,ZTRTN,ZTREQ,ZTSAVE,ZTIO,ZTDTH,ZTUCI,XUPSPGM,PGM,IO("Q"),IO("C")
16 Q
17DQ D @($S($D(XUPSPGM):XUPSPGM,$D(PGM):PGM,1:"CLOSE"))
18 D KILL^%ZTLOAD,CLOSE
19 Q
20DTQ N XUPSX,Z,X,%H I $D(ZTSK("D")) S XUPSX=ZTSK("D"),%H=$P(XUPSX,",") D YMD^%DTC S XUPSX=$P(XUPSX,",",2),Z=X_((XUPSX#3600\60)/100+(XUPSX\3600)/100) ;Find time queued
21 Q
Note: See TracBrowser for help on using the repository browser.