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/XUTMONH1.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1XUTMONH1 ;SEA/RDS - TaskMan: Option, XUTMON, Part 4 (Help Modules) ;5/12/94 12:11
2 ;;8.0;KERNEL;;Jul 10, 1995
3 ;
4 Q
5 ;
6PRINT ;Subroutine--Print A Task
7 N ZTMT,ZTSK W:'ZTC @IOF,!,ZTH,! W:'ZTF !,"-------------------------------------------------------------------------------"
8 S X=0,ZTF=0 D EN^XUTMTP(ZTS) I $Y>18 W ! S ZTF=1,DIR(0)="E" D ^DIR S X=$D(DTOUT)!$D(DUOUT) Q:X W @IOF
9 S ZTC=ZTC+1 Q
10 ;
11OUT ;Tag for breaking FOR scope to exit early
12 Q
13 ;
14SCHED ;Display Schedule List
15 N DIR,DIRUT,DTOUT,DUOUT,X,ZT,ZT1,ZTC,ZTF,ZTH,ZTS S ZTC=0,ZTF=1,ZTH="Schedule list..."
16 S ZT1="" F ZT=0:0 S ZT1=$O(^%ZTSCH(ZT1)) Q:'ZT1 F ZTS=0:0 S ZTS=$O(^%ZTSCH(ZT1,ZTS)) Q:'ZTS D PRINT S ZTC=ZTC+1 G OUT:X
17 I 'ZTC W !!,"The Schedule List is empty."
18 W ! S DIR(0)="E",DIR("A")=$S(ZTC:"End of listing. ",1:"")_"Press RETURN to continue" D ^DIR Q
19 ;
20WAIT ;Display Waiting Lists
21 N DIR,DIRUT,DTOUT,DUOUT,X,ZT,ZT1,ZT2,ZT3,ZTC,ZTF,ZTH,ZTS S ZTC=0,ZTF=1,ZTH="Device waiting lists..."
22 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="" D W0 G OUT:X
23 I 'ZTC W !!,"The Device Waiting Lists are empty."
24 W ! S DIR(0)="E",DIR("A")=$S(ZTC:"End of listing. ",1:"")_"Press RETURN to continue" D ^DIR Q
25 ;
26W0 ;WAIT Subroutine--Extending IO Loop
27 S ZTS=ZT3 D PRINT S ZTC=ZTC+1 Q:X
28 Q
29 ;
30WAIT1 ;Display One Waiting List
31 N DIR,DIRUT,DTOUT,DUOUT,X,ZT,ZT1,ZT2,ZT3,ZTC,ZTF,ZTH,ZTIO,ZTION,ZTS
32 F ZT=0:0 D W2 Q:ZTION="" S ZT1=ZTIO D W1 Q:X
33 Q
34 ;
35W1 ;WAIT1 Subroutine--Extending Loop
36 S ZTC=0,ZTF=1,ZTH="Waiting list for device "_ZTION_"..."
37 S X=0,ZTC=0,ZT2="" 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 PRINT S ZTC=ZTC+1 G OUT:X
38 Q:X W:'ZTC !?5,"There are no tasks waiting for device ",ZTION,"." W ! Q
39 ;
40W2 ;WAIT1--prompt user for a device
41 S DIR(0)="PO^3.5:EMQZ"
42 S DIR("A")="Select DEVICE"
43 S DIR("?",1)=" Answer should be a device whose waiting list you want to see."
44 S DIR("?")=" Enter ?? for a list of devices with waiting tasks."
45 S DIR("??")="^D W3^XUTMONH1"
46 D ^DIR K DIR
47 I $D(DTOUT) W $C(7)
48 I $D(DIRUT) S ZTION="" Q
49 S ZTION=$P(Y,U,2),ZTIO=$P(Y(0),U,2)
50 Q
51 ;
52W3 ;W2--?? help for device selection
53 N ZT,ZT1,ZT2,ZT3,ZT4,ZTC
54 W !!?5,"These are the devices with waiting tasks:",!
55 S ZT1="IO",ZT2="" F ZT=0:0 S ZT2=$O(^%ZTSCH(ZT1,ZT2)) Q:ZT2="" W !?5,ZT2 D WCNT W ?40,ZTC," task",$S(ZTC=1:"",1:"s")
56 Q
57 ;
58WCNT ;W3--count tasks waiting for each device
59 S ZT3="",ZTC=0 F ZT=0:0 S ZT3=$O(^%ZTSCH(ZT1,ZT2,ZT3)),ZT4="" Q:ZT3="" F ZT=0:0 S ZT4=$O(^%ZTSCH(ZT1,ZT2,ZT3,ZT4)) Q:ZT4="" S ZTC=ZTC+1
60 Q
61 ;
Note: See TracBrowser for help on using the repository browser.