XUTMTZ1 ;SEA/RDS - TaskMan: Toolkit: Test Utilities (Symbol Table) ;5/20/91 15:40 ; [ 04/02/2003 8:29 AM ]
;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
;;8.0;KERNEL;;Jul 10, 1995
;
RECORD ;queuable entry point to record the symbol table at ^TMP("XUTMTZ",
S ^TMP("XUTMTZ","VAR",$J,$H)=ZTSK_", VARIABLE DUMP"
S X="^TMP(""XUTMTZ"",""VAR"",$J,$H," D DOLRO^%ZOSV
H 1 S ^TMP("XUTMTZ","VAR",$J,$H)="-----------------------------------------"
Q
;
SETUP ;programmer mode entry point to setup a task's symbol table
;
REPORT ;entry--report all errors in Error file by count
K ^TMP("XUTMTZ"),^("XUTMTZ1")
S ZTRANSLT="" F ZTA=0:1:31,127 S ZTRANSLT=ZTRANSLT_$C(ZTA)
S ZT1=0 F ZT=0:0 S ZT1=$O(^%ZTER(1,ZT1)),ZT2=0 Q:'ZT1 F ZT=0:0 S ZT2=$O(^%ZTER(1,ZT1,1,ZT2)) Q:'ZT2 I $D(^(ZT2,"ZE"))#2 S ZTE=$E($TR(^("ZE"),ZTRANSLT,""),1,40) I ZTE]"" S X=$S($D(^TMP($J,"XUTMTZ",ZTE))#2:^(ZTE)+1,1:1),^(ZTE)=X W "."
S ZT1="" F ZT=0:0 S ZT1=$O(^TMP($J,"XUTMTZ",ZT1)) Q:ZT1="" S ZTX=^(ZT1),^TMP($J,"XUTMTZ1",ZTX,ZT1)="" W "."
S ZT1=0 F ZT=0:0 S ZT1=$O(^TMP($J,"XUTMTZ1",ZT1)),ZT2="" Q:'ZT1 F ZT=0:0 S ZT2=$O(^TMP($J,"XUTMTZ1",ZT1,ZT2)) Q:ZT2="" W !,ZT1,?5,ZT2
K ^TMP($J,"XUTMTZ"),^("XUTMTZ1"),ZT,ZT1,ZT2,ZTA,ZTE,ZTRANSLT,ZTX
Q
;
REMOVE ;entry--remove a type of error from the Error file
F QUASI=0:0 D READ Q:$D(DIRUT) D DEL
K DA,DIK,DIRUT,DTOUT,DUOUT,QUASI,X,ZT,ZTC,ZTE,ZTYPE
Q
;
READ ;REMOVE--read in type of error to remove
K DIRUT,DTOUT,DUOUT,ZTYPE
R !,"Error to remove: ",X:$S($D(DTIME)#2:DTIME,1:60)
I '$T W $C(7),"**TIMEOUT**" S DTOUT=1,DIRUT=1 Q
I X="^" S DUOUT=1,DIRUT=1 Q
I X="" S DIRUT=1 Q
I X="?" W !!?5,"Answer must be free text.",!?5,"Every error that contains the answer will be purged from the Error file.",! G READ
I X?."?" W !!,"Generating frequency report" D REPORT W ! G READ
S ZTYPE=X
Q
;
DEL ;REMOVE--remove type of error from Error file
S DA(1)=0,ZTC=0 F ZT=0:0 S DA(1)=$O(^%ZTER(1,DA(1))),DA=0,DIK="^%ZTER(1,DA(1),1," Q:'DA(1) W !,DA(1) F ZT=0:0 S DA=$O(^%ZTER(1,DA(1),1,DA)) Q:'DA W "." I $D(^(DA,"ZE"))#2 S ZTE=^("ZE") I ZTE[ZTYPE D ^DIK W DA S ZTC=ZTC+1
W !!,"Number of errors removed: ",ZTC,!
Q
;
REPORT2 ;entry--report all errors in TaskMan Error file by count
K ^TMP("XUTMTZ"),^("XUTMTZ1")
S ZTRANSLT="" F ZTA=0:1:31,127 S ZTRANSLT=ZTRANSLT_$C(ZTA)
S ZT1=0 F ZT=0:0 S ZT1=$O(^%ZTSCH("ER",ZT1)),ZT2=0 Q:'ZT1 F ZT=0:0 S ZT2=$O(^%ZTSCH("ER",ZT1,ZT2)) Q:'ZT2 I $D(^(ZT2))#2 S ZTE=$E($TR(^(ZT2),ZTRANSLT,""),1,40) I ZTE]"" S X=$S($D(^TMP($J,"XUTMTZ",ZTE))#2:^(ZTE)+1,1:1),^(ZTE)=X W "."
S ZT1="" F ZT=0:0 S ZT1=$O(^TMP($J,"XUTMTZ",ZT1)) Q:ZT1="" S ZTX=^(ZT1),^TMP($J,"XUTMTZ1",ZTX,ZT1)="" W "."
S ZT1=0 F ZT=0:0 S ZT1=$O(^TMP($J,"XUTMTZ1",ZT1)),ZT2="" Q:'ZT1 F ZT=0:0 S ZT2=$O(^TMP($J,"XUTMTZ1",ZT1,ZT2)) Q:ZT2="" W !,ZT1,?5,ZT2
K ^TMP($J,"XUTMTZ"),^("XUTMTZ1"),ZT,ZT1,ZT2,ZTA,ZTE,ZTRANSLT
Q
;
XUTMTZ1 ;SEA/RDS - TaskMan: Toolkit: Test Utilities (Symbol Table) ;5/20/91 15:40 ; [ 04/02/2003 8:29 AM ]
+1 ;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
+2 ;;8.0;KERNEL;;Jul 10, 1995
+3 ;
RECORD ;queuable entry point to record the symbol table at ^TMP("XUTMTZ",
+1 SET ^TMP("XUTMTZ","VAR",$JOB,$HOROLOG)=ZTSK_", VARIABLE DUMP"
+2 SET X="^TMP(""XUTMTZ"",""VAR"",$J,$H,"
DO DOLRO^%ZOSV
+3 HANG 1
SET ^TMP("XUTMTZ","VAR",$JOB,$HOROLOG)="-----------------------------------------"
+4 QUIT
+5 ;
SETUP ;programmer mode entry point to setup a task's symbol table
+1 ;
REPORT ;entry--report all errors in Error file by count
+1 KILL ^TMP("XUTMTZ"),^("XUTMTZ1")
+2 SET ZTRANSLT=""
FOR ZTA=0:1:31,127
SET ZTRANSLT=ZTRANSLT_$CHAR(ZTA)
+3 SET ZT1=0
FOR ZT=0:0
SET ZT1=$ORDER(^%ZTER(1,ZT1))
SET ZT2=0
IF 'ZT1
QUIT
FOR ZT=0:0
SET ZT2=$ORDER(^%ZTER(1,ZT1,1,ZT2))
IF 'ZT2
QUIT
IF $DATA(^(ZT2,"ZE"))#2
SET ZTE=$EXTRACT($TRANSLATE(^("ZE"),ZTRANSLT,""),1,40)
IF ZTE]""
SET X=$SELECT($DATA(^TMP($JOB,"XUTMTZ",ZTE))#2:^(ZTE)+1,1:1)
SET ^(ZTE)=X
WRITE "."
+4 SET ZT1=""
FOR ZT=0:0
SET ZT1=$ORDER(^TMP($JOB,"XUTMTZ",ZT1))
IF ZT1=""
QUIT
SET ZTX=^(ZT1)
SET ^TMP($JOB,"XUTMTZ1",ZTX,ZT1)=""
WRITE "."
+5 SET ZT1=0
FOR ZT=0:0
SET ZT1=$ORDER(^TMP($JOB,"XUTMTZ1",ZT1))
SET ZT2=""
IF 'ZT1
QUIT
FOR ZT=0:0
SET ZT2=$ORDER(^TMP($JOB,"XUTMTZ1",ZT1,ZT2))
IF ZT2=""
QUIT
WRITE !,ZT1,?5,ZT2
+6 KILL ^TMP($JOB,"XUTMTZ"),^("XUTMTZ1"),ZT,ZT1,ZT2,ZTA,ZTE,ZTRANSLT,ZTX
+7 QUIT
+8 ;
REMOVE ;entry--remove a type of error from the Error file
+1 FOR QUASI=0:0
DO READ
IF $DATA(DIRUT)
QUIT
DO DEL
+2 KILL DA,DIK,DIRUT,DTOUT,DUOUT,QUASI,X,ZT,ZTC,ZTE,ZTYPE
+3 QUIT
+4 ;
READ ;REMOVE--read in type of error to remove
+1 KILL DIRUT,DTOUT,DUOUT,ZTYPE
+2 READ !,"Error to remove: ",X:$SELECT($DATA(DTIME)#2:DTIME,1:60)
+3 IF '$TEST
WRITE $CHAR(7),"**TIMEOUT**"
SET DTOUT=1
SET DIRUT=1
QUIT
+4 IF X="^"
SET DUOUT=1
SET DIRUT=1
QUIT
+5 IF X=""
SET DIRUT=1
QUIT
+6 IF X="?"
WRITE !!?5,"Answer must be free text.",!?5,"Every error that contains the answer will be purged from the Error file.",!
GOTO READ
+7 IF X?."?"
WRITE !!,"Generating frequency report"
DO REPORT
WRITE !
GOTO READ
+8 SET ZTYPE=X
+9 QUIT
+10 ;
DEL ;REMOVE--remove type of error from Error file
+1 SET DA(1)=0
SET ZTC=0
FOR ZT=0:0
SET DA(1)=$ORDER(^%ZTER(1,DA(1)))
SET DA=0
SET DIK="^%ZTER(1,DA(1),1,"
IF 'DA(1)
QUIT
WRITE !,DA(1)
FOR ZT=0:0
SET DA=$ORDER(^%ZTER(1,DA(1),1,DA))
IF 'DA
QUIT
WRITE "."
IF $DATA(^(DA,"ZE"))#2
SET ZTE=^("ZE")
IF ZTE[ZTYPE
DO ^DIK
WRITE DA
SET ZTC=ZTC+1
+2 WRITE !!,"Number of errors removed: ",ZTC,!
+3 QUIT
+4 ;
REPORT2 ;entry--report all errors in TaskMan Error file by count
+1 KILL ^TMP("XUTMTZ"),^("XUTMTZ1")
+2 SET ZTRANSLT=""
FOR ZTA=0:1:31,127
SET ZTRANSLT=ZTRANSLT_$CHAR(ZTA)
+3 SET ZT1=0
FOR ZT=0:0
SET ZT1=$ORDER(^%ZTSCH("ER",ZT1))
SET ZT2=0
IF 'ZT1
QUIT
FOR ZT=0:0
SET ZT2=$ORDER(^%ZTSCH("ER",ZT1,ZT2))
IF 'ZT2
QUIT
IF $DATA(^(ZT2))#2
SET ZTE=$EXTRACT($TRANSLATE(^(ZT2),ZTRANSLT,""),1,40)
IF ZTE]""
SET X=$SELECT($DATA(^TMP($JOB,"XUTMTZ",ZTE))#2:^(ZTE)+1,1:1)
SET ^(ZTE)=X
WRITE "."
+4 SET ZT1=""
FOR ZT=0:0
SET ZT1=$ORDER(^TMP($JOB,"XUTMTZ",ZT1))
IF ZT1=""
QUIT
SET ZTX=^(ZT1)
SET ^TMP($JOB,"XUTMTZ1",ZTX,ZT1)=""
WRITE "."
+5 SET ZT1=0
FOR ZT=0:0
SET ZT1=$ORDER(^TMP($JOB,"XUTMTZ1",ZT1))
SET ZT2=""
IF 'ZT1
QUIT
FOR ZT=0:0
SET ZT2=$ORDER(^TMP($JOB,"XUTMTZ1",ZT1,ZT2))
IF ZT2=""
QUIT
WRITE !,ZT1,?5,ZT2
+6 KILL ^TMP($JOB,"XUTMTZ"),^("XUTMTZ1"),ZT,ZT1,ZT2,ZTA,ZTE,ZTRANSLT
+7 QUIT
+8 ;