[613] | 1 | XUTMTUL ;SEA/RDS - TaskMan: ToolKit, Unschedule List ;11/18/94 11:53
|
---|
| 2 | ;;8.0;KERNEL;;Jul 10, 1995
|
---|
| 3 | ;
|
---|
| 4 | SCHED ;Lookup Tasks In Schedule File
|
---|
| 5 | N ZT,ZT1,ZT2,ZT3,ZT4,ZT5,ZT6,ZTF,ZTS S ZTSK=0 K ^TMP($J,"XUTMTUL")
|
---|
| 6 | S ZT1="" F ZT=0:0 S ZT1=$O(^%ZTSCH(ZT1)),ZT2="" Q:'ZT1 F ZT=0:0 S ZT2=$O(^%ZTSCH(ZT1,ZT2)) Q:ZT2="" S ZTS=ZT2 D SCREEN,DQSCHED:ZTF
|
---|
| 7 | S ZT1="" F ZT=0:0 S ZT1=$O(^%ZTSCH("IO",ZT1)),ZT2="" Q:ZT1="" F ZT=0:0 S ZT2=$O(^%ZTSCH("IO",ZT1,ZT2)),ZT3="" Q:ZT2="" F ZT=0:0 S ZT3=$O(^%ZTSCH("IO",ZT1,ZT2,ZT3)) Q:ZT3="" S ZTS=ZT3 D SCREEN,DQIO:ZTF
|
---|
| 8 | S ZT1="" F ZT=0:0 S ZT1=$O(^%ZTSCH("JOB",ZT1)),ZT2="" Q:ZT1="" F ZT=0:0 S ZT2=$O(^%ZTSCH("JOB",ZT1,ZT2)) Q:ZT2="" S ZTS=ZT2 D SCREEN,DQJOB:ZTF
|
---|
| 9 | S ZT1="" F ZT=0:0 S ZT1=$O(^%ZTSCH("LINK",ZT1)),ZT2="" Q:ZT1="" F ZT=0:0 S ZT2=$O(^%ZTSCH("LINK",ZT1,ZT2)),ZT3="" Q:ZT2="" F ZT=0:0 S ZT3=$O(^%ZTSCH("LINK",ZT1,ZT2,ZT3)) Q:ZT3="" S ZTS=ZT3 D SCREEN,DQLINK:ZTF
|
---|
| 10 | K ^TMP($J,"XUTMTUL") Q
|
---|
| 11 | ;
|
---|
| 12 | SCREEN ;Screen Tasks For Selection & User Authority To Select
|
---|
| 13 | N X
|
---|
| 14 | S ZTF=0 I '$D(^TMP($J,"XUTMT",ZTS)) S ZT5=$O(^TMP($J,"XUTMT",ZTS)) Q:ZT5="" S ZT6=$O(^(ZT5,"")) Q:ZT6>ZTS!'ZT6
|
---|
| 15 | I 'ZTKEY S X=$G(^%ZTSK(ZTS)) I $S(X="":1,$P(X,U,11)_","_$P(X,U,12)=XUTMUCI:DUZ'=$P(X,U,3),1:ZTNAME'=$P(X,U,10)) Q
|
---|
| 16 | S ZTF=1 S:'$D(^TMP($J,"XUTMTUL",ZTS)) ^TMP($J,"XUTMTUL",ZTS)="",ZTSK=ZTSK+1 Q
|
---|
| 17 | ;
|
---|
| 18 | DQSCHED ;Dequeue A Schedule List Entry
|
---|
| 19 | L +^%ZTSK(ZT2),+^%ZTSCH(ZT1,ZT2)
|
---|
| 20 | S:$D(^%ZTSCH(ZT1,ZT2))#2 ZT3=^(ZT2) K ^(ZT2) I ZT3]"" S:$D(^%ZTSK(ZT2)) $P(^(ZT2,.2),"^")=ZT3
|
---|
| 21 | S:$D(^%ZTSK(ZT2)) $P(^(ZT2,.1),"^",1,3)="F^"_$H_U_ZTNAME
|
---|
| 22 | L -^%ZTSCH(ZT1,ZT2),-^%ZTSK(ZT2)
|
---|
| 23 | Q
|
---|
| 24 | ;
|
---|
| 25 | DQIO ;Dequeue A Device Waiting List
|
---|
| 26 | N %ZTIO,ZTDTH,ZTSK
|
---|
| 27 | S %ZTIO=ZT1,ZTDTH=ZT2,ZTSK=ZT3 L +^%ZTSK(ZTSK),+^%ZTSCH("IO") D DQ^%ZTM4
|
---|
| 28 | S:$D(^%ZTSK(ZTSK)) $P(^(ZTSK,.1),U,1,3)="F^"_$H_U_ZTNAME
|
---|
| 29 | L -^%ZTSCH("IO"),^%ZTSK(ZTSK)
|
---|
| 30 | Q
|
---|
| 31 | ;
|
---|
| 32 | DQJOB ;Dequeue A Submanager Waiting List Entry
|
---|
| 33 | L +^%ZTSK(ZT3),+^%ZTSCH("JOB") K ^%ZTSCH("JOB",ZT1,ZT2)
|
---|
| 34 | S:$D(^%ZTSK(ZT3)) $P(^(ZT3,.1),U,1,3)="F^"_$H_U_ZTNAME
|
---|
| 35 | L -^%ZTSCH("JOB"),-^%ZTSK(ZT3) Q
|
---|
| 36 | ;
|
---|
| 37 | DQLINK ;Dequeue A Link Waiting List Entry
|
---|
| 38 | L +^%ZTSK(ZT3),+^%ZTSCH("LINK") K ^%ZTSCH("LINK",ZT1,ZT2,ZT3)
|
---|
| 39 | S:$D(^%ZTSK(ZT3)) $P(^(ZT3,.1),U,1,3)="F^"_$H_U_ZTNAME
|
---|
| 40 | L -^ZTSCH("LINK"),-^%ZTSK(ZT3) Q
|
---|
| 41 | ;
|
---|