XUTMTZ2 ;SEA/RDS - TaskMan: Toolkit, troubleshooting, part 3 ;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
;
REPORT ;entry--report all errors in Error file by count
K ^TMP($J)
S ZTRANSLT="" F ZTA=0:1:31,127 S ZTRANSLT=ZTRANSLT_$C(ZTA)
D %ZTER G QUIT:$D(DIRUT) D COUNT G QUIT:$D(DIRUT)
D DAY G QUIT:$D(DIRUT) I ZTDAY D NUMBER G QUIT:$D(DIRUT)
I 'ZTDAY,'ZTCOUNT W !!,$C(7),"No report selected!" G QUIT
D PRINT G QUIT:$D(DIRUT) D MAIL G QUIT:$D(DIRUT)
I 'ZTPRINT,'ZTMAIL W !!,"No method of reporting selected." G QUIT
I ZTMAIL D EN^XM,DES^XMA21 G QUIT:$D(DIRUT)
W !!,"Generating the report."
D HERE^XUTMTZ3,OTHERS^XUTMTZ3:ZTOTHERS
D DAILIES^XUTMTZ3:ZTDAY,TOTALS^XUTMTZ3:ZTCOUNT
D OUT^XUTMTZ3:ZTPRINT,SEND^XUTMTZ3:ZTMAIL
QUIT K ^TMP($J),X,Y,ZT,ZT1,ZT2,ZT3,ZTA,ZTE,ZTMAIL,ZTOTHERS,ZTPRINT,ZTRANSLT,ZTX
Q
;
%ZTER ;REPORT--prompt user as to whether %ZTER is replicated/translated
S DIR(0)="YO",DIR("A")="Is %ZTER translated/replicated",DIR("B")="YES"
S DIR("?",1)="Answer YES to restrict the search to this volume set."
S DIR("?")="If not, I will search the %ZTER on each volume set."
D ^DIR K DIR
I $D(DTOUT) W $C(7),"**TIMEOUT**"
I $D(DIRUT) W !!,"Report canceled!" Q
S ZTOTHERS='Y
Q
;
COUNT ;REPORT--prompt user as to whether to count unresolved errors
S DIR(0)="YO",DIR("A")="Count unresolved errors since install"
S DIR("B")="YES"
S DIR("?",1)="Answer NO to suppress count of unresolved errors."
S DIR("?")="Otherwise a list of errors by count will be generated."
W ! D ^DIR K DIR
I $D(DTOUT) W $C(7),"**TIMEOUT**"
I $D(DIRUT) W !!,"Report canceled!" Q
S ZTCOUNT=Y
Q
;
DAY ;REPORT--prompt user as to whether to report errors by day
S DIR(0)="YO",DIR("A")="Report errors by day of occurrence"
S DIR("B")="YES"
S DIR("?",1)="Answer NO to suppress display of errors by day."
S DIR("?")="Otherwise list will show error that occurred each day."
D ^DIR K DIR
I $D(DTOUT) W $C(7),"**TIMEOUT**"
I $D(DIRUT) W !!,"Report canceled!" Q
S ZTDAY=Y
Q
;
NUMBER ;REPORT--prompt user as to how many days' errors to show
S DIR(0)="NO^1:9999",DIR("A")="Number of days to show"
S DIR("B")=9999
S DIR("?",1)="Answer with the number of days to display."
S DIR("?")="Answer must be a number between 1 and 9999."
D ^DIR K DIR
I $D(DTOUT) W $C(7),"**TIMEOUT**"
I $D(DIRUT) W !!,"Report canceled!" Q
S ZTNUMBER=Y
Q
;
PRINT ;REPORT--prompt user as to whether to display the report
S DIR(0)="YO",DIR("A")="Display the report"
S DIR("B")="YES"
S DIR("?",1)="Answer NO to suppress display of the report."
S DIR("?")="Otherwise it will be displayed on the terminal."
W ! D ^DIR K DIR
I $D(DTOUT) W $C(7),"**TIMEOUT**"
I $D(DIRUT) W !!,"Report canceled!" Q
S ZTPRINT=Y
Q
;
MAIL ;REPORT--prompt user as to whether to mail the report
S DIR(0)="YO",DIR("A")="Mail the report"
S DIR("B")="NO"
S DIR("?",1)="Answer YES to mail the report."
S DIR("?")="Otherwise the report will not be bundled into a mail message."
D ^DIR K DIR
I $D(DTOUT) W $C(7),"**TIMEOUT**"
I $D(DIRUT) W !!,"Report canceled!" Q
S ZTMAIL=Y
Q
;
XUTMTZ2 ;SEA/RDS - TaskMan: Toolkit, troubleshooting, part 3 ;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 ;
REPORT ;entry--report all errors in Error file by count
+1 KILL ^TMP($JOB)
+2 SET ZTRANSLT=""
FOR ZTA=0:1:31,127
SET ZTRANSLT=ZTRANSLT_$CHAR(ZTA)
+3 DO %ZTER
IF $DATA(DIRUT)
GOTO QUIT
DO COUNT
IF $DATA(DIRUT)
GOTO QUIT
+4 DO DAY
IF $DATA(DIRUT)
GOTO QUIT
IF ZTDAY
DO NUMBER
IF $DATA(DIRUT)
GOTO QUIT
+5 IF 'ZTDAY
IF 'ZTCOUNT
WRITE !!,$CHAR(7),"No report selected!"
GOTO QUIT
+6 DO PRINT
IF $DATA(DIRUT)
GOTO QUIT
DO MAIL
IF $DATA(DIRUT)
GOTO QUIT
+7 IF 'ZTPRINT
IF 'ZTMAIL
WRITE !!,"No method of reporting selected."
GOTO QUIT
+8 IF ZTMAIL
DO EN^XM
DO DES^XMA21
IF $DATA(DIRUT)
GOTO QUIT
+9 WRITE !!,"Generating the report."
+10 DO HERE^XUTMTZ3
IF ZTOTHERS
DO OTHERS^XUTMTZ3
+11 IF ZTDAY
DO DAILIES^XUTMTZ3
IF ZTCOUNT
DO TOTALS^XUTMTZ3
+12 IF ZTPRINT
DO OUT^XUTMTZ3
IF ZTMAIL
DO SEND^XUTMTZ3
QUIT KILL ^TMP($JOB),X,Y,ZT,ZT1,ZT2,ZT3,ZTA,ZTE,ZTMAIL,ZTOTHERS,ZTPRINT,ZTRANSLT,ZTX
+1 QUIT
+2 ;
%ZTER ;REPORT--prompt user as to whether %ZTER is replicated/translated
+1 SET DIR(0)="YO"
SET DIR("A")="Is %ZTER translated/replicated"
SET DIR("B")="YES"
+2 SET DIR("?",1)="Answer YES to restrict the search to this volume set."
+3 SET DIR("?")="If not, I will search the %ZTER on each volume set."
+4 DO ^DIR
KILL DIR
+5 IF $DATA(DTOUT)
WRITE $CHAR(7),"**TIMEOUT**"
+6 IF $DATA(DIRUT)
WRITE !!,"Report canceled!"
QUIT
+7 SET ZTOTHERS='Y
+8 QUIT
+9 ;
COUNT ;REPORT--prompt user as to whether to count unresolved errors
+1 SET DIR(0)="YO"
SET DIR("A")="Count unresolved errors since install"
+2 SET DIR("B")="YES"
+3 SET DIR("?",1)="Answer NO to suppress count of unresolved errors."
+4 SET DIR("?")="Otherwise a list of errors by count will be generated."
+5 WRITE !
DO ^DIR
KILL DIR
+6 IF $DATA(DTOUT)
WRITE $CHAR(7),"**TIMEOUT**"
+7 IF $DATA(DIRUT)
WRITE !!,"Report canceled!"
QUIT
+8 SET ZTCOUNT=Y
+9 QUIT
+10 ;
DAY ;REPORT--prompt user as to whether to report errors by day
+1 SET DIR(0)="YO"
SET DIR("A")="Report errors by day of occurrence"
+2 SET DIR("B")="YES"
+3 SET DIR("?",1)="Answer NO to suppress display of errors by day."
+4 SET DIR("?")="Otherwise list will show error that occurred each day."
+5 DO ^DIR
KILL DIR
+6 IF $DATA(DTOUT)
WRITE $CHAR(7),"**TIMEOUT**"
+7 IF $DATA(DIRUT)
WRITE !!,"Report canceled!"
QUIT
+8 SET ZTDAY=Y
+9 QUIT
+10 ;
NUMBER ;REPORT--prompt user as to how many days' errors to show
+1 SET DIR(0)="NO^1:9999"
SET DIR("A")="Number of days to show"
+2 SET DIR("B")=9999
+3 SET DIR("?",1)="Answer with the number of days to display."
+4 SET DIR("?")="Answer must be a number between 1 and 9999."
+5 DO ^DIR
KILL DIR
+6 IF $DATA(DTOUT)
WRITE $CHAR(7),"**TIMEOUT**"
+7 IF $DATA(DIRUT)
WRITE !!,"Report canceled!"
QUIT
+8 SET ZTNUMBER=Y
+9 QUIT
+10 ;
PRINT ;REPORT--prompt user as to whether to display the report
+1 SET DIR(0)="YO"
SET DIR("A")="Display the report"
+2 SET DIR("B")="YES"
+3 SET DIR("?",1)="Answer NO to suppress display of the report."
+4 SET DIR("?")="Otherwise it will be displayed on the terminal."
+5 WRITE !
DO ^DIR
KILL DIR
+6 IF $DATA(DTOUT)
WRITE $CHAR(7),"**TIMEOUT**"
+7 IF $DATA(DIRUT)
WRITE !!,"Report canceled!"
QUIT
+8 SET ZTPRINT=Y
+9 QUIT
+10 ;
MAIL ;REPORT--prompt user as to whether to mail the report
+1 SET DIR(0)="YO"
SET DIR("A")="Mail the report"
+2 SET DIR("B")="NO"
+3 SET DIR("?",1)="Answer YES to mail the report."
+4 SET DIR("?")="Otherwise the report will not be bundled into a mail message."
+5 DO ^DIR
KILL DIR
+6 IF $DATA(DTOUT)
WRITE $CHAR(7),"**TIMEOUT**"
+7 IF $DATA(DIRUT)
WRITE !!,"Report canceled!"
QUIT
+8 SET ZTMAIL=Y
+9 QUIT
+10 ;