BCHEXERR ; IHS/CMI/LAB - LOG ERROR IN EXPORT ;
;;2.0;IHS RPMS CHR SYSTEM;;OCT 23, 2012;Build 27
;
START ;
S BCHE("ERR DFN")=$O(^BCHERR("B",BCHE,"")) I BCHE("ERR DFN")="" S BCHE("MSG")=BCHE_"-ERROR INFORMATION NOT IN ERROR FILE" G ERR
S BCHE("MSG")=BCHE_"-"_$P(^BCHERR(BCHE("ERR DFN"),0),U,2) S:$L(BCHE("MSG"))=5 BCHE("MSG")=BCHE("MSG")_"- ERROR INFORMATION NOT IN ERROR FILE" S BCHE("MSG")=$E(BCHE("MSG"),1,45)
ERR ;
K DIE,DR S DA=BCH("RUN LOG"),DR="5101///""`"_BCHR_"""",DR(2,90002.915101)=".02///"_BCHE("MSG"),DIE="^BCHXLOG("
D CALLDIE^BCHUTIL
I $D(Y) S BCH("QFLG")=25 W:'$D(ZTQUEUED) !!,"Error encountered in ^BCHERR. Notify programmer!",! I $D(ZTQUEUED) D ERRBULL^BCHEXDI3
Q
BCHEXERR ; IHS/CMI/LAB - LOG ERROR IN EXPORT ;
+1 ;;2.0;IHS RPMS CHR SYSTEM;;OCT 23, 2012;Build 27
+2 ;
START ;
+1 SET BCHE("ERR DFN")=$ORDER(^BCHERR("B",BCHE,""))
IF BCHE("ERR DFN")=""
SET BCHE("MSG")=BCHE_"-ERROR INFORMATION NOT IN ERROR FILE"
GOTO ERR
+2 SET BCHE("MSG")=BCHE_"-"_$PIECE(^BCHERR(BCHE("ERR DFN"),0),U,2)
IF $LENGTH(BCHE("MSG"))=5
SET BCHE("MSG")=BCHE("MSG")_"- ERROR INFORMATION NOT IN ERROR FILE"
SET BCHE("MSG")=$EXTRACT(BCHE("MSG"),1,45)
ERR ;
+1 KILL DIE,DR
SET DA=BCH("RUN LOG")
SET DR="5101///""`"_BCHR_""""
SET DR(2,90002.915101)=".02///"_BCHE("MSG")
SET DIE="^BCHXLOG("
+2 DO CALLDIE^BCHUTIL
+3 IF $DATA(Y)
SET BCH("QFLG")=25
IF '$DATA(ZTQUEUED)
WRITE !!,"Error encountered in ^BCHERR. Notify programmer!",!
IF $DATA(ZTQUEUED)
DO ERRBULL^BCHEXDI3
+4 QUIT