DGEN339T ;ALB/SCK - IVMB HEC VETERAN MERGE EXTRACT POST INSTALL ; 1/13/2001
;;5.3;Registration;**339,1015**;Aug 13,1993;Build 21
;
EN ; Main entry point to populate the IVMB HEC VSE NOTIFICATION mail group
; This routine is run as the post-install routine to patch DG*5.3*339
;
N DIR,DIRUT,DUOUT,MGIEN,DIC
;
S DIC=3.8
S DIC(0)="MZ"
S X="IVMB HEC VSE NOTIFICATION"
D ^DIC K DIC
I '(+Y>0) D Q
. W !!?5,*7,"Apparently the IVMB HEC VSE NOTIFICATION mail group was not"
. W !?5,"created or set up correctly by the DG*5.3*339 patch installation."
. W !?5,"You will need to either create this mail group, or contact Cutomer"
. W !?5,"Service for assistance."
;
S MGIEN=+Y
;
D LOCAL(MGIEN)
;
W !
S DIR(0)="YAO",DIR("B")="NO"
S DIR("A")="Do you wish to enter any remote members? "
S DIR("?",1)="Enter 'Yes' to add remote members to the mail group"
S DIR("?")="Enter 'No' or Press the ENTER key to quit"
D ^DIR K DIR
Q:'Y!($D(DIRUT))!($D(DUOUT))
W !
;
D REMOTE
;
Q
;
LOCAL(MGIEN) ; Add local members to mail group
N I,ABORT,XMY
;
F I=1:1 Q:$G(ABORT) D
. S DIR(0)="POA^200:EMZ"
. S DIR("A")="Select member to add to mail group: "
. S DIR("?",1)="Select a member to add to the IVMB HEC VSE NOTIFICATION mail group"
. S DIR("?")="as a local member."
. D ^DIR K DIR
. I $D(DIRUT)!($D(DUOUT)) S ABORT=1 Q
. S XMY(+Y)=""
. ;
. S DIR(0)="YA",DIR("B")="NO"
. S DIR("A")="Add another member? "
. S DIR("?")="'Yes' to add another local member, 'No' for no more entries"
. D ^DIR K DIR
. Q:$D(DIRUT)!($D(DUOUT))
. S:'Y ABORT=1
;
I $$MG^XMBGRP(MGIEN,"","","",.XMY,"",0)
;
Q
;
REMOTE ; Add remote members to mail group
N I,ABORT,ZFDA,CNT,ZMSG,I1
;
S CNT=2
F I=1:1 Q:$G(ABORT) D
. S DIR(0)="FOA"
. S DIR("A")="Enter a remote address: "
. S DIR("?",1)="Enter a remote address (name@domain) or local device (D.device) or"
. S DIR("?",2)="local server (S.device). This is free text, validated remote address"
. S DIR("?")="or local device or server"
. D ^DIR K DIR
. I $D(DIRUT)!($D(DUOUT)) S ABORT=1 Q
. S ZFDA(3.812,"+"_CNT_",?1,",.01)=Y
. S CNT=CNT+1
. ;
. S DIR(0)="YA",DIR("B")="NO"
. S DIR("A")="Add another remote member? "
. S DIR("?")="'Yes' to add another remote member, 'No' for no more entries."
. D ^DIR K DIR
. Q:$D(DIRUT)!($D(DUOUT))
. S:'Y ABORT=1
S ZFDA(3.8,"?1,",.01)="IVMB HEC VSE NOTIFICATION"
D UPDATE^DIE("","ZFDA","","ZMSG")
;
I $D(ZMSG) D
. S I=0
. F S I=$O(ZMSG("DIERR",I)) Q:'I D
. . W !!?3,"Error: "_ZMSG("DIERR",I)
. . S I1=0
. . F S I1=$O(ZMSG("DIERR",I,"TEXT",I1)) Q:'I1 D
. . . W !?3,ZMSG("DIERR",I,"TEXT",I1)
;
Q
DGEN339T ;ALB/SCK - IVMB HEC VETERAN MERGE EXTRACT POST INSTALL ; 1/13/2001
+1 ;;5.3;Registration;**339,1015**;Aug 13,1993;Build 21
+2 ;
EN ; Main entry point to populate the IVMB HEC VSE NOTIFICATION mail group
+1 ; This routine is run as the post-install routine to patch DG*5.3*339
+2 ;
+3 NEW DIR,DIRUT,DUOUT,MGIEN,DIC
+4 ;
+5 SET DIC=3.8
+6 SET DIC(0)="MZ"
+7 SET X="IVMB HEC VSE NOTIFICATION"
+8 DO ^DIC
KILL DIC
+9 IF '(+Y>0)
Begin DoDot:1
+10 WRITE !!?5,*7,"Apparently the IVMB HEC VSE NOTIFICATION mail group was not"
+11 WRITE !?5,"created or set up correctly by the DG*5.3*339 patch installation."
+12 WRITE !?5,"You will need to either create this mail group, or contact Cutomer"
+13 WRITE !?5,"Service for assistance."
End DoDot:1
QUIT
+14 ;
+15 SET MGIEN=+Y
+16 ;
+17 DO LOCAL(MGIEN)
+18 ;
+19 WRITE !
+20 SET DIR(0)="YAO"
SET DIR("B")="NO"
+21 SET DIR("A")="Do you wish to enter any remote members? "
+22 SET DIR("?",1)="Enter 'Yes' to add remote members to the mail group"
+23 SET DIR("?")="Enter 'No' or Press the ENTER key to quit"
+24 DO ^DIR
KILL DIR
+25 IF 'Y!($DATA(DIRUT))!($DATA(DUOUT))
QUIT
+26 WRITE !
+27 ;
+28 DO REMOTE
+29 ;
+30 QUIT
+31 ;
LOCAL(MGIEN) ; Add local members to mail group
+1 NEW I,ABORT,XMY
+2 ;
+3 FOR I=1:1
IF $GET(ABORT)
QUIT
Begin DoDot:1
+4 SET DIR(0)="POA^200:EMZ"
+5 SET DIR("A")="Select member to add to mail group: "
+6 SET DIR("?",1)="Select a member to add to the IVMB HEC VSE NOTIFICATION mail group"
+7 SET DIR("?")="as a local member."
+8 DO ^DIR
KILL DIR
+9 IF $DATA(DIRUT)!($DATA(DUOUT))
SET ABORT=1
QUIT
+10 SET XMY(+Y)=""
+11 ;
+12 SET DIR(0)="YA"
SET DIR("B")="NO"
+13 SET DIR("A")="Add another member? "
+14 SET DIR("?")="'Yes' to add another local member, 'No' for no more entries"
+15 DO ^DIR
KILL DIR
+16 IF $DATA(DIRUT)!($DATA(DUOUT))
QUIT
+17 IF 'Y
SET ABORT=1
End DoDot:1
+18 ;
+19 IF $$MG^XMBGRP(MGIEN,"","","",.XMY,"",0)
+20 ;
+21 QUIT
+22 ;
REMOTE ; Add remote members to mail group
+1 NEW I,ABORT,ZFDA,CNT,ZMSG,I1
+2 ;
+3 SET CNT=2
+4 FOR I=1:1
IF $GET(ABORT)
QUIT
Begin DoDot:1
+5 SET DIR(0)="FOA"
+6 SET DIR("A")="Enter a remote address: "
+7 SET DIR("?",1)="Enter a remote address (name@domain) or local device (D.device) or"
+8 SET DIR("?",2)="local server (S.device). This is free text, validated remote address"
+9 SET DIR("?")="or local device or server"
+10 DO ^DIR
KILL DIR
+11 IF $DATA(DIRUT)!($DATA(DUOUT))
SET ABORT=1
QUIT
+12 SET ZFDA(3.812,"+"_CNT_",?1,",.01)=Y
+13 SET CNT=CNT+1
+14 ;
+15 SET DIR(0)="YA"
SET DIR("B")="NO"
+16 SET DIR("A")="Add another remote member? "
+17 SET DIR("?")="'Yes' to add another remote member, 'No' for no more entries."
+18 DO ^DIR
KILL DIR
+19 IF $DATA(DIRUT)!($DATA(DUOUT))
QUIT
+20 IF 'Y
SET ABORT=1
End DoDot:1
+21 SET ZFDA(3.8,"?1,",.01)="IVMB HEC VSE NOTIFICATION"
+22 DO UPDATE^DIE("","ZFDA","","ZMSG")
+23 ;
+24 IF $DATA(ZMSG)
Begin DoDot:1
+25 SET I=0
+26 FOR
SET I=$ORDER(ZMSG("DIERR",I))
IF 'I
QUIT
Begin DoDot:2
+27 WRITE !!?3,"Error: "_ZMSG("DIERR",I)
+28 SET I1=0
+29 FOR
SET I1=$ORDER(ZMSG("DIERR",I,"TEXT",I1))
IF 'I1
QUIT
Begin DoDot:3
+30 WRITE !?3,ZMSG("DIERR",I,"TEXT",I1)
End DoDot:3
End DoDot:2
End DoDot:1
+31 ;
+32 QUIT