XUMF382 ;ISS/RAM - post-install routine ;04/15/02
;;8.0;KERNEL;**382**;Jul 10, 1995
;
POST ; -- post init
;
N X
S X=$$ATTREM()
;
Q
;
ATTREM() ;Attach Remote Members to XUMF ERROR Mail Group
N XUMFERRF,XUMFFDA,XUMFGIEN,XUMFGNM,XUMFLNE,XUMFMSG,XUMFRNM,XUMFTXT
K XUMMSG
D BMES^XPDUTL("Attaching Remote Members to XUMF Mail Groups")
F XUMFLNE=1:1 S XUMFTXT=$P($T(REMMEM+XUMFLNE),";;",2) Q:XUMFTXT="END"!($G(XUMFERRF)) D
. S XUMFGNM=$P(XUMFTXT,"^",1)
. S XUMFGIEN=$$FIND1^DIC(3.8,"","X",XUMFGNM,"","","")
. S XUMFRNM=$P(XUMFTXT,"^",2)
. ;If Mail Group not found, error
. I XUMFGIEN'>0 D
. . S XUMMSG(1)="**"
. . S XUMMSG(2)="** Mail Group "_XUMFGNM_" not found"
. . D MES^XPDUTL(.XUMMSG) K XUMMSG
. . S XUMFERRF=1
. ELSE D
. . ;Attach Remote Member to Mail Group
. . N XUMFFDA,XUMFIEN,XUMFMSG
. . S XUMFFDA(3.812,"?+2,"_XUMFGIEN_",",.01)=XUMFRNM
. . D UPDATE^DIE("","XUMFFDA","XUMFIEN","XUMFMSG")
. . ;Check for error
. . I $D(XUMFMSG("DIERR")) D
. . . S XUMMSG(1)="**"
. . . S XUMMSG(2)="** Unable to attach "_XUMFRNM_" to "_XUMFGNM
. . . D MES^XPDUTL(.XUMMSG) K XUMMSG
. . . S XUMFERRF=1
. . ELSE D
. . . S XUMMSG(1)=" "
. . . S XUMMSG(2)=".."_XUMFRNM_$S($G(XUMFIEN(2,0))="?":" already",1:"")_" attached to "_XUMFGNM
. . . D MES^XPDUTL(.XUMMSG) K XUMMSG
;Check for error
I $G(XUMFERRF) D
. S XUMMSG(1)="** Post-installation will be halted"
. S XUMMSG(2)="**"
. D MES^XPDUTL(.XUMMSG) K XUMMSG
Q +$S($G(XUMFERRF):0,1:1)
;
REMMEM ;Mail Group Name^Remote Member
;;XUMF ERROR^G.XUMF ERROR@FORUM.VA.GOV
;;XUMF ERROR^G.HDIS ERRORS@FORUM.VA.GOV
;;XUMF ERROR^G.HDIS ERT NOTIFICATION@FORUM.VA.GOV
;;END
XUMF382 ;ISS/RAM - post-install routine ;04/15/02
+1 ;;8.0;KERNEL;**382**;Jul 10, 1995
+2 ;
POST ; -- post init
+1 ;
+2 NEW X
+3 SET X=$$ATTREM()
+4 ;
+5 QUIT
+6 ;
ATTREM() ;Attach Remote Members to XUMF ERROR Mail Group
+1 NEW XUMFERRF,XUMFFDA,XUMFGIEN,XUMFGNM,XUMFLNE,XUMFMSG,XUMFRNM,XUMFTXT
+2 KILL XUMMSG
+3 DO BMES^XPDUTL("Attaching Remote Members to XUMF Mail Groups")
+4 FOR XUMFLNE=1:1
SET XUMFTXT=$PIECE($TEXT(REMMEM+XUMFLNE),";;",2)
IF XUMFTXT="END"!($GET(XUMFERRF))
QUIT
Begin DoDot:1
+5 SET XUMFGNM=$PIECE(XUMFTXT,"^",1)
+6 SET XUMFGIEN=$$FIND1^DIC(3.8,"","X",XUMFGNM,"","","")
+7 SET XUMFRNM=$PIECE(XUMFTXT,"^",2)
+8 ;If Mail Group not found, error
+9 IF XUMFGIEN'>0
Begin DoDot:2
+10 SET XUMMSG(1)="**"
+11 SET XUMMSG(2)="** Mail Group "_XUMFGNM_" not found"
+12 DO MES^XPDUTL(.XUMMSG)
KILL XUMMSG
+13 SET XUMFERRF=1
End DoDot:2
+14 IF '$TEST
Begin DoDot:2
+15 ;Attach Remote Member to Mail Group
+16 NEW XUMFFDA,XUMFIEN,XUMFMSG
+17 SET XUMFFDA(3.812,"?+2,"_XUMFGIEN_",",.01)=XUMFRNM
+18 DO UPDATE^DIE("","XUMFFDA","XUMFIEN","XUMFMSG")
+19 ;Check for error
+20 IF $DATA(XUMFMSG("DIERR"))
Begin DoDot:3
+21 SET XUMMSG(1)="**"
+22 SET XUMMSG(2)="** Unable to attach "_XUMFRNM_" to "_XUMFGNM
+23 DO MES^XPDUTL(.XUMMSG)
KILL XUMMSG
+24 SET XUMFERRF=1
End DoDot:3
+25 IF '$TEST
Begin DoDot:3
+26 SET XUMMSG(1)=" "
+27 SET XUMMSG(2)=".."_XUMFRNM_$SELECT($GET(XUMFIEN(2,0))="?":" already",1:"")_" attached to "_XUMFGNM
+28 DO MES^XPDUTL(.XUMMSG)
KILL XUMMSG
End DoDot:3
End DoDot:2
End DoDot:1
+29 ;Check for error
+30 IF $GET(XUMFERRF)
Begin DoDot:1
+31 SET XUMMSG(1)="** Post-installation will be halted"
+32 SET XUMMSG(2)="**"
+33 DO MES^XPDUTL(.XUMMSG)
KILL XUMMSG
End DoDot:1
+34 QUIT +$SELECT($GET(XUMFERRF):0,1:1)
+35 ;
REMMEM ;Mail Group Name^Remote Member
+1 ;;XUMF ERROR^G.XUMF ERROR@FORUM.VA.GOV
+2 ;;XUMF ERROR^G.HDIS ERRORS@FORUM.VA.GOV
+3 ;;XUMF ERROR^G.HDIS ERT NOTIFICATION@FORUM.VA.GOV
+4 ;;END