1 | XUPSUTQ ;EDS/GRR - QUEUEING UTILITY (%ZTLOAD) ; 16-JUL-03
|
---|
2 | ;;8.0;KERNEL;**309**;Jul 10, 1995
|
---|
3 | ;
|
---|
4 | Q1 S ZTDTH=$H
|
---|
5 | QUE 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")=""
|
---|
9 | LOAD 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
|
---|
11 | ZIS 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
|
---|
14 | CLOSE Q:$D(ZTQUEUED) N POP D ^%ZISC
|
---|
15 | END K ZTSK,ZTDESC,ZTRTN,ZTREQ,ZTSAVE,ZTIO,ZTDTH,ZTUCI,XUPSPGM,PGM,IO("Q"),IO("C")
|
---|
16 | Q
|
---|
17 | DQ D @($S($D(XUPSPGM):XUPSPGM,$D(PGM):PGM,1:"CLOSE"))
|
---|
18 | D KILL^%ZTLOAD,CLOSE
|
---|
19 | Q
|
---|
20 | DTQ 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
|
---|