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/XUINTSK2.m@ 660

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1XUINTSK2 ;SFISC/RWF - Reschedule tasks in IO, JOB, LINK queues. ;11/18/94 08:00
2 ;;8.0;KERNEL;;Jul 10, 1995
3 ;
4A L +^%ZTSCH
5 D IOQ,JOB,C
6 L -^%ZTSCH
7 Q
8 ;
9IOQ ;Check the IO queue
10 S ZTSK="",%ZTIO="" I '$D(^%ZTSCH("IO")) Q
11 D I2
12 Q
13 ;
14I2 S %ZTIO=$O(^%ZTSCH("IO",%ZTIO)),ZTDTH="0,0" I %ZTIO="" Q
15I3 S ZTDTH=$O(^%ZTSCH("IO",%ZTIO,ZTDTH)),ZTSK="" I ZTDTH'["," G I2
16I5 S ZTSK=$O(^%ZTSCH("IO",%ZTIO,ZTDTH,ZTSK)) I ZTSK="" G I3
17 L +^%ZTSK(ZTSK) G I7:$D(^%ZTSCH("IO",%ZTIO,ZTDTH,ZTSK))[0
18 S ZTQUEUED=.5 D DQ^%ZTM4
19 S ^%ZTSCH(ZTDTH,ZTSK)="",^%ZTSK(ZTSK,.1)="1^"_$H
20I7 L -^%ZTSK(ZTSK) G I5
21 Q
22 ;
23C ;GETTASK--On C type volume sets, get tasks from Cross-Volume Job List
24 S ZTCPU=""
25 F S ZTCPU=$O(^%ZTSCH("C",ZTCPU)) Q:ZTCPU="" D C3
26 Q
27C3 S ZTSK="",ZTDTH="0,0"
28 F S ZTDTH=$O(^%ZTSCH("C",ZTCPU,ZTDTH)) Q:ZTDTH'["," D
29 . S ZTSK=0
30 . F S ZTSK=$O(^%ZTSCH("C",ZTCPU,ZTDTH,ZTSK)) Q:ZTSK="" D
31 .. K ^%ZTSCH("C",ZTCPU,ZTDTH,ZTSK)
32 .. I $D(^%ZTSK(ZTSK,0))[0!'ZTSK Q
33 .. S ^%ZTSCH(ZTDTH,ZTSK)=""
34 .. Q
35 . Q
36 Q
37 ;
38JOB ;GETTASK--search Partition Waiting List
39 S ZTSK="",ZTDTH="0,0"
40J2 S ZTDTH=$O(^%ZTSCH("JOB",ZTDTH)),ZTSK="" I ZTDTH'["," Q
41J3 S ZTSK=$O(^%ZTSCH("JOB",ZTDTH,ZTSK)) I ZTSK="" G J2
42 L +^%ZTSK(ZTSK) I $D(^%ZTSCH("JOB",ZTDTH,ZTSK))[0 G J7
43 I $D(^%ZTSK(ZTSK,0))[0!'ZTSK G J7
44 S ZTQUEUED=.5 K ^%ZTSCH("JOB",ZTDTH,ZTSK)
45 S ^%ZTSCH(ZTDTH,ZTSK)=""
46J7 L -^%ZTSK(ZTSK) G J3
47 ;
Note: See TracBrowser for help on using the repository browser.