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/XUTMTS.m@ 1595

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1XUTMTS ;SEA/RDS - TaskMan: ToolKit, Stop Task ;04/17/95 10:11
2 ;;8.0;KERNEL;;Jul 10, 1995
3 ;
4TASK ;Lookup Task File Data
5 S ZTSK=XUTMT L +^%ZTSK(ZTSK):5 I '$T S ZTSK="" G NOPE
6 I '$D(^%ZTSK(ZTSK)),'$D(^%ZTSCH("TASK",ZTSK)) S ZTSK="" G NOPE
7 ;S $P(^%ZTSK(ZTSK,.1),U,10)=ZTNAME,ZTSK(0)=$S($D(^%ZTSK(ZTSK,0))#2:^(0),1:""),ZTSK(.1)=$S($D(^(.1))#2:^(.1),1:""),ZTSK(.2)=$S($D(^(.2))#2:^(.2),1:""),ZTSK(.25)=$S($D(^(.25))#2:^(.25),1:"")
8 N XUTMP
9 D LOAD^XUTMUTL(XUTMT,"XUTMP")
10 ;S ZTUNSCH=0
11 ;
12SCHED ;Lookup Task In Schedule File And Dequeue It
13 D DQ^%ZTLOAD
14 ;ZTUNSCH is to tell if task was found in a list
15 ;Need to Mod %ZTLOAD6 if needed
16 ;I $D(^%ZTSCH(ZT1,ZTSK))#2 S ZTSK("A",ZT1,ZTSK)="",ZT2=^(ZTSK),ZTUNSCH=1 K ^(ZTSK) I ZT2]"" S $P(^%ZTSK(ZTSK,.2),U)=ZT2,$P(ZTSK(.2),U)=ZT2
17 ;I $D(^(ZT2,ZTSK))#2 S ZTSK("JOB",ZT1,ZT2,ZTSK)="",ZTUNSCH=1 K ^(ZTSK)
18 ;I $D(^(ZT2,ZTSK))#2 S ZTSK("LINK",ZT1,ZT2,ZTSK)="",ZTUNSCH=1 K ^(ZTSK)
19 S:$D(^%ZTSCH("TASK",ZTSK))#2 ZTSK("TASK",ZTSK)=^(ZTSK)
20 ;
21QUIT ;Set Status For Task And Quit
22 S XUTMP=ZTSK M ZTSK=XUTMP
23 S $P(^%ZTSK(ZTSK,.1),U,1,3)="F^"_$H_U_ZTNAME
24NOPE L -^%ZTSK(XUTMT) K XUTMT
25 Q
26 ;
27SCHEDIO ;Extend Waiting List Traversal Loop
28 N %ZTIO,ZTDTH,XUTMUCI S ZTSK("IO",ZT1,ZT2,ZT3,ZTSK)="",%ZTIO=ZT1,ZTDTH=ZT2,XUTMUCI=ZT3,ZTUNSCH=1 L +^%ZTSCH("IO"):15 D DQ^%ZTM4 L -^%ZTSCH("IO") Q
29 ;
Note: See TracBrowser for help on using the repository browser.