DVBAUDDILG1 ;ALB/CP - UTL Reusable FM DIALOG Calls #1 ; 10/10/18 2:06pm
;;2.7;AMIE;**256**;;Build 19
; Per VHA Directive 6402 this routine should not be modified
; MSG^DIALOG ; IA # 2050
; CLEAN^DILF ; IA # 2054
Q
;
DIERR(DVBWIDTH,DVBLMAR,DVBMSGROOT,DVBFROMRTN,DVBNOPAUSE) ; Display DBS error messages.
;
;
S DVBQUIT=0 ; Initialize output flag DVBQUIT to successful (0).
S DVBFROMRTN=$G(DVBFROMRTN)
;
; Check for required input parameters
;
I '$G(DVBWIDTH)!('$G(DVBLMAR)) D Q
. I $E(IOST,1,2)="C-" D ; Output message only to a display screen.
. . N DVBERRMSG
. . S DVBERRMSG="One or more required input parameters are missing "
. . D CENTER^DVBAUDPRT1(DVBERRMSG,2,IOM,1)
. . I DVBFROMRTN]"" D ;
. . . S DVBERRMSG="in calling routine "_DVBFROMRTN
. . . D CENTER^DVBAUDPRT1(DVBERRMSG,1,IOM,1)
. . S DVBERRMSG="to the DIERR^DVBAUDOAU API call"
. . D CENTER^DVBAUDPRT1(DVBERRMSG,1,IOM,1)
. . Q:$G(DVBNOPAUSE) I $E(IOST,1,2)="C-" D CONTINUE^DVBAUDPRT1(2,"R")
. S DVBQUIT=1 ; Set return flag to unsuccessful
;
Q:'$G(DIERR) ; Quit if no database server error message detected.
;
I $E(IOST,1,2)="C-" D ; Output message only to a display screen.
. ; ZEXCEPT: AR
. W !
. I $G(DVBMSGROOT)]"" D MSG^DIALOG("WE",,DVBWIDTH,DVBLMAR,DVBMSGROOT)
. I $G(DVBMSGROOT)']"" D MSG^DIALOG("WE","",DVBWIDTH,DVBLMAR)
. I $G(DVBIENS)]"" W !,?DVBLMAR,"For IENS: ",DVBIENS D ;
. . Q:'$G(DVBFILE) W " file #",DVBFILE
. I $G(DVB2IENS)]"" W !,?DVBLMAR,"For IENS: ",DVB2IENS D ;
. . Q:'$G(DVBFILE) W " file #",DVBFILE
. I DVBFROMRTN]"" W !,?DVBLMAR,"Error generated from "_DVBFROMRTN_"."
. Q:$G(DVBNOPAUSE) I $E(IOST,1,2)="C-" D CONTINUE^DVBAUDPRT1(2,"R")
D CLEAN^DILF ; Kills standard ^TMP DBS global and local variables.
I $G(DVBMSGROOT)]"" K @DVBMSGROOT ; Cleanup local message array
S DVBQUIT=1 ; Set return flag to unsuccessful
;
K DVB2IENS
Q ; DIERR
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBAUDDILG1 1941 printed Sep 17, 2026@20:27:19 Page 2
DVBAUDDILG1 ;ALB/CP - UTL Reusable FM DIALOG Calls #1 ; 10/10/18 2:06pm
+1 ;;2.7;AMIE;**256**;;Build 19
+2 ; Per VHA Directive 6402 this routine should not be modified
+3 ; MSG^DIALOG ; IA # 2050
+4 ; CLEAN^DILF ; IA # 2054
+5 QUIT
+6 ;
DIERR(DVBWIDTH,DVBLMAR,DVBMSGROOT,DVBFROMRTN,DVBNOPAUSE) ; Display DBS error messages.
+1 ;
+2 ;
+3 ; Initialize output flag DVBQUIT to successful (0).
SET DVBQUIT=0
+4 SET DVBFROMRTN=$GET(DVBFROMRTN)
+5 ;
+6 ; Check for required input parameters
+7 ;
+8 IF '$GET(DVBWIDTH)!('$GET(DVBLMAR))
Begin DoDot:1
+9 ; Output message only to a display screen.
IF $EXTRACT(IOST,1,2)="C-"
Begin DoDot:2
+10 NEW DVBERRMSG
+11 SET DVBERRMSG="One or more required input parameters are missing "
+12 DO CENTER^DVBAUDPRT1(DVBERRMSG,2,IOM,1)
+13 ;
IF DVBFROMRTN]""
Begin DoDot:3
+14 SET DVBERRMSG="in calling routine "_DVBFROMRTN
+15 DO CENTER^DVBAUDPRT1(DVBERRMSG,1,IOM,1)
End DoDot:3
+16 SET DVBERRMSG="to the DIERR^DVBAUDOAU API call"
+17 DO CENTER^DVBAUDPRT1(DVBERRMSG,1,IOM,1)
+18 if $GET(DVBNOPAUSE)
QUIT
IF $EXTRACT(IOST,1,2)="C-"
DO CONTINUE^DVBAUDPRT1(2,"R")
End DoDot:2
+19 ; Set return flag to unsuccessful
SET DVBQUIT=1
End DoDot:1
QUIT
+20 ;
+21 ; Quit if no database server error message detected.
if '$GET(DIERR)
QUIT
+22 ;
+23 ; Output message only to a display screen.
IF $EXTRACT(IOST,1,2)="C-"
Begin DoDot:1
+24 ; ZEXCEPT: AR
+25 WRITE !
+26 IF $GET(DVBMSGROOT)]""
DO MSG^DIALOG("WE",,DVBWIDTH,DVBLMAR,DVBMSGROOT)
+27 IF $GET(DVBMSGROOT)']""
DO MSG^DIALOG("WE","",DVBWIDTH,DVBLMAR)
+28 ;
IF $GET(DVBIENS)]""
WRITE !,?DVBLMAR,"For IENS: ",DVBIENS
Begin DoDot:2
+29 if '$GET(DVBFILE)
QUIT
WRITE " file #",DVBFILE
End DoDot:2
+30 ;
IF $GET(DVB2IENS)]""
WRITE !,?DVBLMAR,"For IENS: ",DVB2IENS
Begin DoDot:2
+31 if '$GET(DVBFILE)
QUIT
WRITE " file #",DVBFILE
End DoDot:2
+32 IF DVBFROMRTN]""
WRITE !,?DVBLMAR,"Error generated from "_DVBFROMRTN_"."
+33 if $GET(DVBNOPAUSE)
QUIT
IF $EXTRACT(IOST,1,2)="C-"
DO CONTINUE^DVBAUDPRT1(2,"R")
End DoDot:1
+34 ; Kills standard ^TMP DBS global and local variables.
DO CLEAN^DILF
+35 ; Cleanup local message array
IF $GET(DVBMSGROOT)]""
KILL @DVBMSGROOT
+36 ; Set return flag to unsuccessful
SET DVBQUIT=1
+37 ;
+38 KILL DVB2IENS
+39 ; DIERR
QUIT