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

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1%ZTLOAD6 ;SEA/RDS-TaskMan: P I: Dequeue ;12/29/94 16:02
2 ;;8.0;KERNEL;;JUL 10, 1995
3 ;
4INPUT ;check input parameters for error conditions
5 I $D(ZTSK)[0 S ZTSK=""
6 I $D(ZTSK)>1 S ZTLOAD=ZTSK K ZTSK S ZTSK=ZTLOAD K ZTLOAD
7 I ZTSK<1!(ZTSK\1'=ZTSK) S ZTSK(0)=0 Q
8 L +^%ZTSK(ZTSK)
9 ;
10 D UNSCH
11QUIT ;cleanup & quit
12 I $D(^%ZTSK(ZTSK)),$D(DUZ)#2,DUZ]"",$D(^VA(200,DUZ,0))#2 S $P(^%ZTSK(ZTSK,.1),U,1,3)="F^"_$H_U_$P(^VA(200,DUZ,0),U)
13 L -^%ZTSK(ZTSK) S ZTSK(0)=1 K ZT,ZT1,ZT2,ZT3
14 Q
15 ;
16UNSCH ;search ^%ZTSCH & unschedule task
17 ;Call with task locked.
18 N ZT1,ZT2,ZT3
19 S ZT1=0 F S ZT1=$O(^%ZTSCH(ZT1)) Q:'ZT1 I $D(^(ZT1,ZTSK)) S ZT2=$G(^(ZTSK)) K ^%ZTSCH(ZT1,ZTSK) I ZT2]"" S $P(^%ZTSK(ZTSK,.2),U)=ZT2
20 L +^%ZTSCH("JOB"):15
21 S ZT1="" F S ZT1=$O(^%ZTSCH("JOB",ZT1)) Q:ZT1="" I $D(^(ZT1,ZTSK)) K ^%ZTSCH("JOB",ZT1,ZTSK)
22 L -^%ZTSCH("JOB"),+^%ZTSCH("IO"):15
23 S ZT1="" F S ZT1=$O(^%ZTSCH("IO",ZT1)),ZT2="" Q:ZT1="" F S ZT2=$O(^%ZTSCH("IO",ZT1,ZT2)) Q:ZT2="" I $D(^(ZT2,ZTSK)) D DQ(ZT1,ZT2,ZTSK)
24 L -^%ZTSCH("IO"),+^%ZTSCH("C"):15
25 S ZT1="" F S ZT1=$O(^%ZTSCH("C",ZT1)),ZT2="" Q:ZT1="" F S ZT2=$O(^%ZTSCH("C",ZT1,ZT2)) Q:ZT2="" I $D(^(ZT2,ZTSK)) K ^%ZTSCH("C",ZT1,ZT2,ZTSK)
26 L -^%ZTSCH("C"),+^%ZTSCH("LINK")
27 S ZT1="" F S ZT1=$O(^%ZTSCH("LINK",ZT1)),ZT2="" Q:ZT1="" F S ZT2=$O(^%ZTSCH("LINK",ZT1,ZT2)) Q:ZT2="" I $D(^(ZT2,ZTSK)) K ^%ZTSCH("LINK",ZT1,ZT2,ZTSK)
28 L -^%ZTSCH("LINK")
29 Q
30 ;
31DQ(%ZTIO,ZTDTH,ZTSK) ;SEARCH--remove task from Device Waiting List
32 L +^%ZTSCH("IO") D DQ^%ZTM4 L -^%ZTSCH("IO")
33 Q
34 ;
Note: See TracBrowser for help on using the repository browser.