AZHLRER1 ; DSM/GTH - REMOTE ERROR REPORTING, ETC. ; [ 12/30/92 8:25 AM ]
;;1.9X;DSM REMOTE ERROR REPORTING;;FEB 19, 1993
;
Q
;
INQ ;EP - From Option.
N AZHLDAY,BY,DA,DIC,AZHLERR,AZHLFAC,FLDS,FR,L,TO
S DIC="^AZHLRER(",DIC(0)="ACEMQZ" D ^DIC
Q:Y<1 S AZHLFAC=+Y
S DIC="^AZHLRER("_AZHLFAC_",1," D ^DIC
Q:Y<1 S AZHLDAY=+Y
S DIC="^AZHLRER("_AZHLFAC_",1,"_AZHLDAY_",1," D ^DIC
Q:Y<1 S AZHLERR=+Y
D ^%ZIS Q:POP U IO S AZHLIO=IO,AZHLHAT=1
INQ1 ;
S %=^AZHLRER(AZHLFAC,1,AZHLDAY,1,AZHLERR,0)
I '$D(AZHLNMSP) W @IOF
E W !!!
W !," FACILITY : ",AZHLFAC,?25,"$H : ",AZHLDAY,?38,"ERROR : ",AZHLERR,!,"NAMESPACE : ",$P(%,U,2),?20,"VERSION : ",$P(%,U,3),?40,"$ZE : ",$P($P(%,U,4),"~"),"^",$P($P(%,U,4),"~",2)
S %="",$P(%,"-",81)="" W !,%,!!
S AZHL(1)=$P(^AZHLRER(AZHLFAC,1,AZHLDAY,1,AZHLERR,1,0),U,3)
F AZHL=1:1:AZHL(1) I '(AZHL=100),$D(^AZHLRER(AZHLFAC,1,AZHLDAY,1,AZHLERR,1,AZHL)) W !,^(AZHL,0)," = """,^(1),"""" I '$D(AZHLNMSP),$Y>(IOSL-4),$E(IOST)="C" D RT Q:$D(DUOUT)!$D(DTOUT) W @IOF
Q:$D(AZHLNMSP)
D ^%ZISC K AZHL,AZHLHAT
S X="INQ^AZHLRER1",@^%ZOSF("TRAP")
Q
;
DMP ;EP - From Option.
W !! S X="WARNING" D C W ! S X="This option is designed to dump a lot of data to a screen saver utility." D C W ! S X="This could produce several thousands lines of data." D C W ! S X="Use discretion in selecting parameters." D C W !
S X="(BREAK [^C] will be enabled just before dump.)" D C W !!
NEW AZHLNMSP,DIC
S DIC=9.4,DIC(0)="ACEMQZ" D ^DIC Q:Y<0
S AZHLNMSP=$P(Y(0),U,2)
NEW AZHLDAY,AZHLDAYE,AZHLERR,AZHLERRE,AZHLFAC,AZHLFACE,BY,DA,DIR,DIRUT,DTOUT,DUOUT,FLDS,FR,L,TO
S DIC="^AZHLRER(",DIC(0)="ACEMQZ",DIC("A")="Begin with FACILITY :" D ^DIC
Q:Y<1!$D(DUOUT)!$D(DTOUT) S %="000000"_(+$P(^AZHLRER(+Y,0),U)-1),AZHLFAC=$E(%,$L(%)-5,$L(%))
S DIC="^AZHLRER(",DIC(0)="ACEMQZ",DIC("A")="End with FACILITY :" D ^DIC
Q:Y<1!$D(DUOUT)!$D(DTOUT) S AZHLFACE=$P(^AZHLRER(+Y,0),U)
K DIR S DIR(0)="8008907.01,.01",DIR("A")="Enter Beginning $H " D ^DIR
Q:$D(DIRUT) S AZHLDAY=Y-1
K DIR S DIR(0)="8008907.01,.01",DIR("A")="Enter Ending $H " D ^DIR
Q:$D(DIRUT) S AZHLDAYE=Y
K DIR D ^%ZIS Q:POP U IO S AZHLIO=IO,AZHLHAT=1
S AZHLERR=0 S X="DMPEND^AZHLRER1",@^%ZOSF("TRAP") X ^%ZOSF("BRK")
F S AZHLFAC=$O(^AZHLRER("C",AZHLNMSP,AZHLFAC)) Q:'AZHLFAC!(AZHLFAC>AZHLFACE) D
. F S AZHLDAY=$O(^AZHLRER("C",AZHLNMSP,AZHLFAC,AZHLDAY)) Q:'AZHLDAY!(AZHLDAY>AZHLDAYE) D
.. F S AZHLERR=$O(^AZHLRER("C",AZHLNMSP,AZHLFAC,AZHLDAY,AZHLERR)) Q:'AZHLERR D INQ1
..Q
.Q
DMPEND ;EP - Possible from ^C.
X ^%ZOSF("NBRK") D ^%ZISC
Q
;
HDR ;EP - Print menu header.
S %=$P(XQY0,U,2)
G SHDR
PHDR ;EP - Print parent menu header.
S X=$P(^XUTL("XQ",$J,^XUTL("XQ",$J,"T")-1),U,2,3),Y=$P(X,U),%=$P(X,U,2)
SHDR ;EP - Screen header.
W @IOF,!! S X=$P(^DIC(4,$P(^AUTTSITE(1,0),U),0),U) D C
S X=$P($T(AZHLRER1+1),";",4)_", v "_$P($T(AZHLRER1+1),";",3) D C
X ^%ZOSF("UCI") S X="UCI: "_Y D C
S X=% D C
Q
C W $J("",IOM-$L(X)\2)_X,! Q
RT ;EP
I $D(AZHLIO),AZHLIO=IO,'$D(IO("S")) K DIR S DIR(0)="E" S:'$D(AZHLHAT) DIR("A")="Press RETURN...",DIR(0)="EA" D ^DIR K DIR
Q
AZHLRER1 ; DSM/GTH - REMOTE ERROR REPORTING, ETC. ; [ 12/30/92 8:25 AM ]
+1 ;;1.9X;DSM REMOTE ERROR REPORTING;;FEB 19, 1993
+2 ;
+3 QUIT
+4 ;
INQ ;EP - From Option.
+1 NEW AZHLDAY,BY,DA,DIC,AZHLERR,AZHLFAC,FLDS,FR,L,TO
+2 SET DIC="^AZHLRER("
SET DIC(0)="ACEMQZ"
DO ^DIC
+3 IF Y<1
QUIT
SET AZHLFAC=+Y
+4 SET DIC="^AZHLRER("_AZHLFAC_",1,"
DO ^DIC
+5 IF Y<1
QUIT
SET AZHLDAY=+Y
+6 SET DIC="^AZHLRER("_AZHLFAC_",1,"_AZHLDAY_",1,"
DO ^DIC
+7 IF Y<1
QUIT
SET AZHLERR=+Y
+8 DO ^%ZIS
IF POP
QUIT
USE IO
SET AZHLIO=IO
SET AZHLHAT=1
INQ1 ;
+1 SET %=^AZHLRER(AZHLFAC,1,AZHLDAY,1,AZHLERR,0)
+2 IF '$DATA(AZHLNMSP)
WRITE @IOF
+3 IF '$TEST
WRITE !!!
+4 WRITE !," FACILITY : ",AZHLFAC,?25,"$H : ",AZHLDAY,?38,"ERROR : ",AZHLERR,!,"NAMESPACE : ",$PIECE(%,U,2),?20,"VERSION : ",$PIECE(%,U,3),?40,"$ZE : ",$PIECE($PIECE(%,U,4),"~"),"^",$PIECE($PIECE(%,U,4),"~",2)
+5 SET %=""
SET $PIECE(%,"-",81)=""
WRITE !,%,!!
+6 SET AZHL(1)=$PIECE(^AZHLRER(AZHLFAC,1,AZHLDAY,1,AZHLERR,1,0),U,3)
+7 FOR AZHL=1:1:AZHL(1)
IF '(AZHL=100)
IF $DATA(^AZHLRER(AZHLFAC,1,AZHLDAY,1,AZHLERR,1,AZHL))
WRITE !,^(AZHL,0)," = """,^(1),""""
IF '$DATA(AZHLNMSP)
IF $Y>(IOSL-4)
IF $EXTRACT(IOST)="C"
DO RT
IF $DATA(DUOUT)!$DATA(DTOUT)
QUIT
WRITE @IOF
+8 IF $DATA(AZHLNMSP)
QUIT
+9 DO ^%ZISC
KILL AZHL,AZHLHAT
+10 SET X="INQ^AZHLRER1"
SET @^%ZOSF("TRAP")
+11 QUIT
+12 ;
DMP ;EP - From Option.
+1 WRITE !!
SET X="WARNING"
DO C
WRITE !
SET X="This option is designed to dump a lot of data to a screen saver utility."
DO C
WRITE !
SET X="This could produce several thousands lines of data."
DO C
WRITE !
SET X="Use discretion in selecting parameters."
DO C
WRITE !
+2 SET X="(BREAK [^C] will be enabled just before dump.)"
DO C
WRITE !!
+3 NEW AZHLNMSP,DIC
+4 SET DIC=9.4
SET DIC(0)="ACEMQZ"
DO ^DIC
IF Y<0
QUIT
+5 SET AZHLNMSP=$PIECE(Y(0),U,2)
+6 NEW AZHLDAY,AZHLDAYE,AZHLERR,AZHLERRE,AZHLFAC,AZHLFACE,BY,DA,DIR,DIRUT,DTOUT,DUOUT,FLDS,FR,L,TO
+7 SET DIC="^AZHLRER("
SET DIC(0)="ACEMQZ"
SET DIC("A")="Begin with FACILITY :"
DO ^DIC
+8 IF Y<1!$DATA(DUOUT)!$DATA(DTOUT)
QUIT
SET %="000000"_(+$PIECE(^AZHLRER(+Y,0),U)-1)
SET AZHLFAC=$EXTRACT(%,$LENGTH(%)-5,$LENGTH(%))
+9 SET DIC="^AZHLRER("
SET DIC(0)="ACEMQZ"
SET DIC("A")="End with FACILITY :"
DO ^DIC
+10 IF Y<1!$DATA(DUOUT)!$DATA(DTOUT)
QUIT
SET AZHLFACE=$PIECE(^AZHLRER(+Y,0),U)
+11 KILL DIR
SET DIR(0)="8008907.01,.01"
SET DIR("A")="Enter Beginning $H "
DO ^DIR
+12 IF $DATA(DIRUT)
QUIT
SET AZHLDAY=Y-1
+13 KILL DIR
SET DIR(0)="8008907.01,.01"
SET DIR("A")="Enter Ending $H "
DO ^DIR
+14 IF $DATA(DIRUT)
QUIT
SET AZHLDAYE=Y
+15 KILL DIR
DO ^%ZIS
IF POP
QUIT
USE IO
SET AZHLIO=IO
SET AZHLHAT=1
+16 SET AZHLERR=0
SET X="DMPEND^AZHLRER1"
SET @^%ZOSF("TRAP")
XECUTE ^%ZOSF("BRK")
+17 FOR
SET AZHLFAC=$ORDER(^AZHLRER("C",AZHLNMSP,AZHLFAC))
IF 'AZHLFAC!(AZHLFAC>AZHLFACE)
QUIT
Begin DoDot:1
+18 FOR
SET AZHLDAY=$ORDER(^AZHLRER("C",AZHLNMSP,AZHLFAC,AZHLDAY))
IF 'AZHLDAY!(AZHLDAY>AZHLDAYE)
QUIT
Begin DoDot:2
+19 FOR
SET AZHLERR=$ORDER(^AZHLRER("C",AZHLNMSP,AZHLFAC,AZHLDAY,AZHLERR))
IF 'AZHLERR
QUIT
DO INQ1
+20 QUIT
End DoDot:2
+21 QUIT
End DoDot:1
DMPEND ;EP - Possible from ^C.
+1 XECUTE ^%ZOSF("NBRK")
DO ^%ZISC
+2 QUIT
+3 ;
HDR ;EP - Print menu header.
+1 SET %=$PIECE(XQY0,U,2)
+2 GOTO SHDR
PHDR ;EP - Print parent menu header.
+1 SET X=$PIECE(^XUTL("XQ",$JOB,^XUTL("XQ",$JOB,"T")-1),U,2,3)
SET Y=$PIECE(X,U)
SET %=$PIECE(X,U,2)
SHDR ;EP - Screen header.
+1 WRITE @IOF,!!
SET X=$PIECE(^DIC(4,$PIECE(^AUTTSITE(1,0),U),0),U)
DO C
+2 SET X=$PIECE($TEXT(AZHLRER1+1),";",4)_", v "_$PIECE($TEXT(AZHLRER1+1),";",3)
DO C
+3 XECUTE ^%ZOSF("UCI")
SET X="UCI: "_Y
DO C
+4 SET X=%
DO C
+5 QUIT
C WRITE $JUSTIFY("",IOM-$LENGTH(X)\2)_X,!
QUIT
RT ;EP
+1 IF $DATA(AZHLIO)
IF AZHLIO=IO
IF '$DATA(IO("S"))
KILL DIR
SET DIR(0)="E"
IF '$DATA(AZHLHAT)
SET DIR("A")="Press RETURN..."
SET DIR(0)="EA"
DO ^DIR
KILL DIR
+2 QUIT