- ZIBER ;BFH;MSM ERROR REPORT; [ 07/17/91 12:19 PM ]
- ;COPYRIGHT MICRONETICS DESIGN CORP @1982
- S $ZT="ERROR^ZIBER",%DEV=$I
- W !?10,$P($P($ZV,","),"-")," - Error Report Utility"
- I '$D(^UTILITY("%ER")) W !!,"NO ERRORS HAVE BEEN LOGGED" G EXIT
- D ^%GUCI K %,%UCN
- G PACKAGE
- OPT I $D(%AZ("PACKAGE")) K %AZ G PACKAGE
- U 0 W !!,?5,"1 - Display errors",!,?5,"2 - Print errors",!,?5,"3 - Erase errors",!,?5,"4 - Summarize errors"
- R !!,"Enter option: ",%X G EXIT:"^Q"=%X!("^"[%X)
- I %X="?" S %XQF="7,8,9,6,3,4" D QUE^ZIBER1 G OPT
- I $E("Display",1,$L(%X))=%X W $E("Display",$L(%X)+1,99) S %SUM=0 G DAT
- I %X=1 W " - Display" S %SUM=0 G DAT
- I $E("Print",1,$L(%X))=%X W $E("Print",$L(%X)+1,99) G PRINT^ZIBER1
- I %X=2 W " - Print" G PRINT^ZIBER1
- I $E("Erase",1,$L(%X))=%X W $E("Erase",$L(%X)+1,99) G DELETE^ZIBER1
- I %X=3 W " - Erase" G DELETE^ZIBER1
- I $E("Summarize",1,$L(%X))=%X W $E("Summarize",$L(%X)+1,99) G DAT1
- I %X=4 W " - Summarize" G DAT1
- W *7," ..Invalid" G OPT
- ;
- PACKAGE W ! K DIC S DIC(0)="QEAM",DIC=9.4 D ^DIC G EXIT:Y<1!$D(DTOUT)!$D(DUOUT) S %AZ("PACKAGE")=$P(^DIC(9.4,+Y,0),U,2) D ^%GUCI K %,%UCN G DAT1
- ;
- DAT S %DIS=1,FLG=0 R !!,"Enter date > ",%X G OPT:"^"[%X,EXIT:%X="^Q",DINFO:%X="?" D DCHK^ZIBER1 G DAT:%QF,NE
- ;
- DAT1 S %DEL=0,%DIS=0,%SUM=1 ;ENTRY POINT TO SUMMARIZE ERRORS
- G DAT^ZIBER1
- DINFO S %J=$N(^UTILITY("%ER",-1)) I %J<0 W !!,"No errors have been logged for this UCI" G EXIT
- W !!,"Errors have been logged for the following days: "
- F %J=$N(^UTILITY("%ER",-1)):0 Q:%J<0 S %I=%J W "T",$P(",-",",",%I<+$H+1) W:+$H-%I +$H-%I,"," S %J=$N(^(%J))
- S %XQF="1,2,11" D QUE^ZIBER1 G DAT
- DINFO1 S %J=$N(^UTILITY("%ER",-1)) I %J<0 W !!,"No errors have been logged for this UCI" G EXIT
- W !!,"Errors have been logged for the following days: "
- F %J=$N(^UTILITY("%ER",-1)):0 Q:%J<0 S %I=%J W "T",$P(",-",",",%I<+$H+1) W:+$H-%I +$H-%I,"," S %J=$N(^(%J))
- S %XQF="1,2,11,12,20" D QUE^ZIBER1 G DAT1:%SUM,DAT^ZIBER1
- NE S %NE=$D(^UTILITY("%ER",%DAT,0)) I '%NE D E1 G DAT1:%SUM,DAT
- S %NE=^(0) D E1
- ERR K %LIST R !!,"Error # > ",%X G DAT:"^"[%X,EXIT:%X="^Q" I %X="^L" G:%NE>0 LIST D E1 G ERR
- I %X="?" D E1 S %XQF="1,2,14,18" D QUE^ZIBER1 G ERR
- I %X'?1N.N!(%X>%NE) W *7," ..Invalid" G ERR
- S %NUM=%X
- I '$D(^UTILITY("%ER",%DAT,%NUM,0)) W !!,"Error not on file" G ERR
- WRT R !!,"Symbol > ",%X G ERR:"^"[%X,EXIT:%X="^Q",PMODE:%X="^S"
- I %X="?" S %XQF="1,2,13,10,15,16" D QUE^ZIBER1 G WRT
- S %FND=1,%Q=0 I %X="^L" S %SYM="" G WF^ZIBER1
- S %SYM=%X G WF^ZIBER1
- E1 S %A=%NE S:'%A %A="NO" W !,%A," ERROR" W:%A'=1 "S" W " LOGGED ON ",$ZD(%DAT) Q
- E2 W !!,"No errors logged between ",$ZD(%DAT)," and "
- S %DAT=%D2 W $ZD(%DAT) Q
- EXIT U 0 S $ZT="" C:%DEV'=$I %DEV
- KILL K %A,%B,%CASE,%D,%D1,%D2,%DAT,%DEL,%DEV,%DIS,%DUM,%FND,%I,%J,%K,%L,%M,%LIST,%NE,%NE1,%NUM,%PG,%Q,%QF,%RDTE,%RTME,%SYM,%TAG,%UCI,%SUM,%X,%XQF,%Y,%Z,FLG,X,%AZ Q
- LIST S %LIST=1,%J=0,FLG=0 W ! S $Y=0
- L1 S %J=%J+1 G:%J>%NE ERR
- I $D(%AZ("PACKAGE")) S %AZ("P")=%J D TMD2^ZIBER1 I '%AZ("PHIT") S %J=%J-1 G L1
- I $D(^UTILITY("%ER",%DAT,%J,0)) D:$Y>20 NPAGE^ZIBER1 G:FLG=1 ERR W %J,") ",^(0),!! G L1
- LIST1 S %LIST=1,%J=0 W !
- L2 S %J=%J+1 Q:%J>%NE
- I $D(%AZ("PACKAGE")) S %AZ("P")=%J D TMD2^ZIBER1 I '%AZ("PHIT") S %J=%J-1 G L2
- I $D(^UTILITY("%ER",%DAT,%J,0)) W %J,") ",^(0),!! G L2
- PMODE S %(1)=%DAT,%(2)=%NUM K (%) F %=$N(^(100)):0 Q:%<0!(%>1E5) D SET S %=$N(^(%))
- W !!,"Symbols have been set into this partition",!!,"You are exiting this utility" K % W !!,"Error defined as: ",^(0) S $ZT="" S:$D(^(7)) %=$P(^(7),"=",2) I $D(%) I %'="" I $D(@%)
- K % Q
- SET ;
- I ^(%)'?1";".E S @($P(^(%),"=",1))=$P(^(%),"=",2,999) Q
- I $D(^(1E8+99-%))<10 S @($P($E(^(%),2,999),"=",1))=^(1E8+99-%) Q
- S %(3)="" F %(4)=1:1 Q:'$D(^UTILITY("%ER",%(1),%(2),1E8+99-%,%(4))) S %(3)=%(3)_^(%(4))
- S @($P($E(^UTILITY("%ER",%(1),%(2),%),2,999),"=",1))=%(3)
- Q
- ERROR U 0
- I $F($ZE,"<INRPT>") U 0 W !!,"...Aborted." D EXIT V 0:$J:$ZB($V(0,$J,2),#0400,7):2
- ZQ
- ZIBER ;BFH;MSM ERROR REPORT; [ 07/17/91 12:19 PM ]
- +1 ;COPYRIGHT MICRONETICS DESIGN CORP @1982
- +2 SET $ZT="ERROR^ZIBER"
- SET %DEV=$IO
- +3 WRITE !?10,$PIECE($PIECE($ZV,","),"-")," - Error Report Utility"
- +4 IF '$DATA(^UTILITY("%ER"))
- WRITE !!,"NO ERRORS HAVE BEEN LOGGED"
- GOTO EXIT
- +5 DO ^%GUCI
- KILL %,%UCN
- +6 GOTO PACKAGE
- OPT IF $DATA(%AZ("PACKAGE"))
- KILL %AZ
- GOTO PACKAGE
- +1 USE 0
- WRITE !!,?5,"1 - Display errors",!,?5,"2 - Print errors",!,?5,"3 - Erase errors",!,?5,"4 - Summarize errors"
- +2 READ !!,"Enter option: ",%X
- IF "^Q"=%X!("^"[%X)
- GOTO EXIT
- +3 IF %X="?"
- SET %XQF="7,8,9,6,3,4"
- DO QUE^ZIBER1
- GOTO OPT
- +4 IF $EXTRACT("Display",1,$LENGTH(%X))=%X
- WRITE $EXTRACT("Display",$LENGTH(%X)+1,99)
- SET %SUM=0
- GOTO DAT
- +5 IF %X=1
- WRITE " - Display"
- SET %SUM=0
- GOTO DAT
- +6 IF $EXTRACT("Print",1,$LENGTH(%X))=%X
- WRITE $EXTRACT("Print",$LENGTH(%X)+1,99)
- GOTO PRINT^ZIBER1
- +7 IF %X=2
- WRITE " - Print"
- GOTO PRINT^ZIBER1
- +8 IF $EXTRACT("Erase",1,$LENGTH(%X))=%X
- WRITE $EXTRACT("Erase",$LENGTH(%X)+1,99)
- GOTO DELETE^ZIBER1
- +9 IF %X=3
- WRITE " - Erase"
- GOTO DELETE^ZIBER1
- +10 IF $EXTRACT("Summarize",1,$LENGTH(%X))=%X
- WRITE $EXTRACT("Summarize",$LENGTH(%X)+1,99)
- GOTO DAT1
- +11 IF %X=4
- WRITE " - Summarize"
- GOTO DAT1
- +12 WRITE *7," ..Invalid"
- GOTO OPT
- +13 ;
- PACKAGE WRITE !
- KILL DIC
- SET DIC(0)="QEAM"
- SET DIC=9.4
- DO ^DIC
- IF Y<1!$DATA(DTOUT)!$DATA(DUOUT)
- GOTO EXIT
- SET %AZ("PACKAGE")=$PIECE(^DIC(9.4,+Y,0),U,2)
- DO ^%GUCI
- KILL %,%UCN
- GOTO DAT1
- +1 ;
- DAT SET %DIS=1
- SET FLG=0
- READ !!,"Enter date > ",%X
- IF "^"[%X
- GOTO OPT
- IF %X="^Q"
- GOTO EXIT
- IF %X="?"
- GOTO DINFO
- DO DCHK^ZIBER1
- IF %QF
- GOTO DAT
- GOTO NE
- +1 ;
- DAT1 ;ENTRY POINT TO SUMMARIZE ERRORS
- SET %DEL=0
- SET %DIS=0
- SET %SUM=1
- +1 GOTO DAT^ZIBER1
- DINFO
- *** ERROR ***
- SET %J=$N(^UTILITY("%ER",-1))
- IF %J<0
- WRITE !!,"No errors have been logged for this UCI"
- GOTO EXIT
- +1 WRITE !!,"Errors have been logged for the following days: "
- +2
- *** ERROR ***
- FOR %J=$N(^UTILITY("%ER",-1)):0
- IF %J<0
- QUIT
- SET %I=%J
- WRITE "T",$PIECE(",-",",",%I<+$HOROLOG+1)
- IF +$HOROLOG-%I
- WRITE +$HOROLOG-%I,","