42 lines
2.1 KiB
Mathematica
42 lines
2.1 KiB
Mathematica
|
XUTMTUL ;SEA/RDS - TaskMan: ToolKit, Unschedule List ;11/18/94 11:53
|
||
|
;;8.0;KERNEL;;Jul 10, 1995
|
||
|
;
|
||
|
SCHED ;Lookup Tasks In Schedule File
|
||
|
N ZT,ZT1,ZT2,ZT3,ZT4,ZT5,ZT6,ZTF,ZTS S ZTSK=0 K ^TMP($J,"XUTMTUL")
|
||
|
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
|
||
|
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
|
||
|
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
|
||
|
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
|
||
|
K ^TMP($J,"XUTMTUL") Q
|
||
|
;
|
||
|
SCREEN ;Screen Tasks For Selection & User Authority To Select
|
||
|
N X
|
||
|
S ZTF=0 I '$D(^TMP($J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