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/XUTMG19.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: 4.3 KB
Line 
1XUTMG19 ;SF/RWF - TaskMan Code For File 19.2 ;06/09/99 09:32
2 ;;8.0;KERNEL;**20,67,118**;Jul 10, 1995
3 ;
4 Q
5FIND ;subroutine--find scheduled task that will run this option
6 ;Return XUTASK = task number, XUDTH = H3 time
7 N %,OPT,X,X1,Y X ^%ZOSF("UCI") S XUTASK=0,Y=$P(Y,","),OPT=$$GET(19,$$GET(19.2,DA,.01),.01)
8 S X=+$S($D(ZTMQDT):ZTMQDT,$D(^DIC(19.2,DA,0)):$$GET(19.2,DA,2),1:0) Q:'X
9 S XUDTH=$$H3^%ZTM($$FMTH^XLFDT(X))
10 S %=$$GET(19.2,DA,12) I %>0 D CHECK Q:XUTASK
11 F S %=$O(^%ZTSCH(XUDTH,%)) Q:%'>0 I $P($G(^%ZTSK(%,0)),"^",1,2)="ZTSK^XQ1" D CHECK Q:XUTASK
12 Q
13CHECK ;Check a task
14 S X1=$G(^%ZTSK(%,0)) Q:$P(X1,"^",1,2)'="ZTSK^XQ1" Q:$P(X1,"^",11)'=Y
15 I $G(^%ZTSK(%,.03))'[OPT Q ;Check for name in desc.
16 S:$G(^%ZTSK(%,.3,"XQSCH"))=DA XUTASK=%
17 Q
18 ;
19GET(FN,IEN,FE) ;
20 N A,B,C
21 S A=$G(^DD(FN,FE,0)),A=$P(A,"^",4)
22 S B=$P(A,";"),C=$P(A,";",2)
23 Q $P($G(^DIC(FN,IEN,B)),"^",C)
24 ;--------------------------------------------------------------------
25IT2 ;input transform for time (#2)
26 N Y,% S %DT="ETRXF" D ^%DT S X=Y,%=$$NOW^XLFDT() I %+.0002>X K X
27 I '$D(X),'$D(DDS) D CT^XUTMG19
28 Q
29 ;
30CT ;IT2--show current time %=NOW
31 W !,?5,"The current time is ",$E(%,9,10),":",$E(%,11,12)
32 Q
33 ;
34S2 ;set logic for AZTM cross-reference on time (#2)
35 N DV,ZTSK,ZTIO,ZTDTH,ZTDESC,ZTRTN,ZTCPU,X1
36 S ZTDTH=X I 'ZTDTH G EXIT
37 S ZTCPU=$$GET(19.2,DA,5) I ZTCPU']"" K ZTCPU
38 S ZTRTN="ZTSK^XQ1"
39 S ZTSAVE("XQSCH")=DA,X1=+^DIC(19.2,DA,0),ZTSAVE("XQY")=X1
40 S ZTDESC=$P(^DIC(19,X1,0),U)_" - "_$P(^DIC(19,X1,0),U,2)
41 S ZTIO=$$GET(19.2,DA,3)
42 D ^%ZTLOAD S ^DIC(19.2,DA,1)=ZTSK
43EXIT Q
44 ;
45K2 ;kill logic for AZTM cross-reference on time (#2)
46 N XUTASK,XUDTH,XUTMT S ZTMQDT=X D FIND K ZTMQDT I XUTASK'>0 Q
47 Q:XUTASK=$G(ZTQUEUED)
48 S XUTMT=XUTASK,^DIC(19.2,DA,1)="" D ^XUTMTD
49 Q
50 ;
51 ;--------------------------------------------------------------------
52 ;
53IT3 ;input transform for device (#3)
54 N DIC,Y,XUTMG19
55 I X[""""!($A(X)=45)!($L(X)>70) K X Q
56 S DIC="^%ZIS(1,",DIC(0)="E",XUTMG19=X,X=$P(X,";") D ^DIC
57 I Y=-1 K X Q
58 S $P(XUTMG19,";")=$P(Y,U,2),IOP=XUTMG19,%ZIS="NQR" D ^%ZIS
59 I POP K X
60 E S X=ION_";"_$S($D(IO("DOC"))#2:IO("DOC"),1:IOST_";"_IOM_";"_IOSL)
61 D RESETVAR^%ZIS
62 Q
63 ;
64S3 ;set logic for AZTIO cross-reference of device (#3)
65 N XUTASK,XUDTH D FIND I XUTASK'>0 Q
66 S $P(^%ZTSK(XUTASK,.2),U)=X
67 Q
68 ;
69K3 ;kill logic for AZTIO cross-reference of device (#3)
70 N XUTASK,XUDTH D FIND I XUTASK'>0 Q
71 S $P(^%ZTSK(XUTASK,.2),U)=""
72 Q
73 ;
74 ;--------------------------------------------------------------------
75 ;
76IT6 ;input transform for re-sch freq
77 I $L(X)>15!($L(X)<2) K X Q
78 I X?1.3N1"H" Q
79 I X?1.4N1"S" Q
80 I X?1.3N1"D" Q
81 I X?1.2N1"M" Q
82 I X?1.2N1"M(".E1")" Q
83 I "MTWRFSUDE"[$E(X),"@,"[$E(X,2) Q
84 K X
85 Q
86 ;
87 ;-------------------------------------------------------------------
88 ;
89IT5 ;input transform for volume (#5)
90 N X1,X2 S X1=$P(X,":"),X2=$P(X,":",2)
91 I X[""""!($A(X)=45) K X Q
92 I $L(X)>21!($L(X)<2) K X Q
93 I '((X?1.8UN)!(X?1.8UN.1":".12UN)) K X Q
94 I X'[":",'$D(^%ZIS(14.5,"B",X)) K X Q
95 I X[":",'$D(^%ZIS(14.7,"B",X)) K X Q
96 Q
97 ;
98S5 ;set logic for AZTVOL cross-reference of volume
99 N XUCPU,XUTASK,XUDTH D FIND I XUTASK>0 D
100 . S $P(^%ZTSK(XUTASK,0),U,14)=X
101 N X S X=$$GET(19.2,DA,9) D S9 ;Trigger the startup X-ref
102 Q
103 ;
104K5 ;kill logic for AZTVOL cross-reference on volume
105 N XUCPU,XUTASK,XUDTH D FIND I XUTASK>0 D
106 . S $P(^%ZTSK(XUTASK,0),U,14)=""
107 D K9X(X) ;Trigger the startup X-ref
108 Q
109 ;
110 ;--------------------------------------------------------------------
111 ;
112IT9 ;input transform for special queueing (#9)
113 N Y S Y=$P(^DIC(19,+^DIC(19.2,DA,0),0),U,4)
114 I Y="A"!(Y="R") Q
115 K X W $C(7)," ONLY FOR 'ROUTINE' OR 'ACTION' TYPES OF OPTIONS"
116 Q
117 ;
118S9 ;set logic for ASTARTUP cross-reference on special queueing
119 Q:X'["S" ;Only for startup type
120 N Y,Y1,XUCPU,XIO S XUCPU=$$GET(19.2,DA,5),Y1=$$GET(19.2,DA,.01)
121 X ^%ZOSF("UCI") I XUCPU]"" S $P(Y,",",2)=XUCPU
122 S ^%ZTSCH("STARTUP",Y,DA_"Q"_Y1)=$H_U_$$GET(19.2,DA,3)_U
123 Q
124 ;
125K9 ;kill logic for ASTARTUP cross-reference on special queueing
126 N Y,Y1,XUCPU S XUCPU=$$GET(19.2,DA,5),Y1=$$GET(19.2,DA,.01)
127K9A X ^%ZOSF("UCI") I XUCPU]"" S $P(Y,",",2)=XUCPU
128 K ^%ZTSCH("STARTUP",Y,Y1),^%ZTSCH("STARTUP",Y,DA_"Q"_Y1)
129 Q
130 ;
131K9X(XUCPU,Y1) ;Kill logic called from other X-ref
132 N Y S:'$D(XUCPU) XUCPU=$$GET(19.2,DA,5) S:'$D(Y1) Y1=$$GET(19.2,DA,.01)
133 G K9A
134 ;
135XREF ;Reindex the STARTUP nodes
136 N DIK,DA,X
137 F DA=0:0 S DA=$O(^DIC(19.2,DA)) Q:DA'>0 S DIK="^DIC(19.2," D IX^DIK
138 Q
Note: See TracBrowser for help on using the repository browser.