XUTMKA ;ISF/RWF - Send alerts for Taskman ;11/23/99 07:57
;;8.0;KERNEL;**127**
EN1 N CNT K ^TMP($J)
W !,"List of Devices that haven't been successfully opened.",!
D DEVTRY(3600)
D SHOW,CLEAR
Q
;
CLEAR ;Clear the DEVTRY nodes.
K ^%ZTSCH("DEVTRY")
Q
TASK ;Queued task entry point
N CNT,XMB,XMTEXT K ^TMP($J)
D LOG("From "_$$KSP^XUPARAM("WHERE")_" on "_$$HTE^XLFDT($H))
D DEVTRY(3600)
I CNT>1 S XMB="XUTM PROBLEM DEVICES",XMTEXT="^TMP($J," D ^XMB
D CLEAR
Q
DEVTRY(OFFSET) ;Look at the ^%ZTSCH("DEVTRY" nodes to see about problem devices
N DEV,TIME,DTIME
S TIME=$$H3^%ZTM($H),DEV=""
F S DEV=$O(^%ZTSCH("DEVTRY",DEV)) Q:DEV="" D
. S DTIME=$G(^%ZTSCH("DEVTRY",DEV)) Q:DTIME=""
. I (DTIME+OFFSET)<TIME D LOG("Device "_DEV_" has not been successfully opened since "_$$HTE^XLFDT($$H0^%ZTM(DTIME)))
. Q
Q
LOG(MSG) ;Add text to report
S CNT=$G(CNT)+1,^TMP($J,CNT,0)=MSG
Q
;
SHOW ;Show text
N %
F %=1:1 Q:'$D(^TMP($J,%,0)) W !,^(0)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXUTMKA 987 printed Oct 16, 2024@18:14:07 Page 2
XUTMKA ;ISF/RWF - Send alerts for Taskman ;11/23/99 07:57
+1 ;;8.0;KERNEL;**127**
EN1 NEW CNT
KILL ^TMP($JOB)
+1 WRITE !,"List of Devices that haven't been successfully opened.",!
+2 DO DEVTRY(3600)
+3 DO SHOW
DO CLEAR
+4 QUIT
+5 ;
CLEAR ;Clear the DEVTRY nodes.
+1 KILL ^%ZTSCH("DEVTRY")
+2 QUIT
TASK ;Queued task entry point
+1 NEW CNT,XMB,XMTEXT
KILL ^TMP($JOB)
+2 DO LOG("From "_$$KSP^XUPARAM("WHERE")_" on "_$$HTE^XLFDT($HOROLOG))
+3 DO DEVTRY(3600)
+4 IF CNT>1
SET XMB="XUTM PROBLEM DEVICES"
SET XMTEXT="^TMP($J,"
DO ^XMB
+5 DO CLEAR
+6 QUIT
DEVTRY(OFFSET) ;Look at the ^%ZTSCH("DEVTRY" nodes to see about problem devices
+1 NEW DEV,TIME,DTIME
+2 SET TIME=$$H3^%ZTM($HOROLOG)
SET DEV=""
+3 FOR
SET DEV=$ORDER(^%ZTSCH("DEVTRY",DEV))
if DEV=""
QUIT
Begin DoDot:1
+4 SET DTIME=$GET(^%ZTSCH("DEVTRY",DEV))
if DTIME=""
QUIT
+5 IF (DTIME+OFFSET)<TIME
DO LOG("Device "_DEV_" has not been successfully opened since "_$$HTE^XLFDT($$H0^%ZTM(DTIME)))
+6 QUIT
End DoDot:1
+7 QUIT
LOG(MSG) ;Add text to report
+1 SET CNT=$GET(CNT)+1
SET ^TMP($JOB,CNT,0)=MSG
+2 QUIT
+3 ;
SHOW ;Show text
+1 NEW %
+2 FOR %=1:1
if '$DATA(^TMP($JOB,%,0))
QUIT
WRITE !,^(0)
+3 QUIT