DG284PT2 ;ALB/SEK DG*5.3*284 POST-INSTALL TO MAILMAN MSG ; 04/20/00
;;5.3;Registration;**284,1015**;Aug 13, 1993;Build 21
;
;This routine will be run as part of the post-install for patch
;DG*5.3*284
;
;A mail message will be sent to the HEC and the user
;when the post-install is complete.
;
;
MAIL ; Send a mailman msg to user/HEC with results
N DIFROM,%
N IVMCX,IVMDATA,IVMDATA1,IVMFILE,IVMFLD,IVMIENX,IVMIY,IVMNODE,IVMTEXT,IVMX,I
N X,XMDUZ,XMSUB,XMTEXT,XMY,Y,IVMSTA
K ^TMP("DG284PT",$J)
S IVMCX=$$SITE^VASITE,IVMSTA=$P(IVMCX,"^",3)
S XMSUB=IVMSTA_" - Purge of non CAT C IVM verified Means Tests"
S XMDUZ="IVM/HEC PACKAGE",XMY("HARBIN,LYNNE@IVM.VA.GOV")="",XMY(DUZ)="",XMY(.5)="",XMY("PERREAULT,JEAN@IVM.VA.GOV")=""
S XMY("PICKELSIMER,HENRY@IVM.VA.GOV")="",XMY("STEFFEY,KIM@IVM.VA.GOV")=""
S XMY("ARMOUR,EDDIE@IVM.VA.GOV")="",XMY("WHITFIELD,VENIS@IVM.VA.GOV")=""
S XMTEXT="^TMP(""DG284PT"",$J,"
D NOW^%DTC S Y=% D DD^%DT
S ^TMP("DG284PT",$J,1)="Purge of non CAT C IVM verified Means Tests"
S ^TMP("DG284PT",$J,2)=" "
S ^TMP("DG284PT",$J,3)="Facility Name: "_$P(IVMCX,"^",2)_" "_Y
S ^TMP("DG284PT",$J,4)="Station Number: "_IVMSTA
S ^TMP("DG284PT",$J,5)=" "
S IVMTEXT="Income year"
S IVMTEXT=$$BLDSTR^DG284PT1("# of IVM MT purged",IVMTEXT,20,18)
S ^TMP("DG284PT",$J,6)=IVMTEXT
S IVMTEXT=$$REPEAT^XLFSTR("=",$L(IVMTEXT))
S ^TMP("DG284PT",$J,7)=IVMTEXT
S IVMIY=0,IVMNODE=7
F S IVMIY=$O(^XTMP("DGMTPAT",IVMIY)) Q:'IVMIY D
.S IVMDATA=^XTMP("DGMTPAT",IVMIY)
.S IVMTEXT=IVMIY+1700
.S IVMDATA1=$J(+$P(IVMDATA,U),6)
.S IVMTEXT=$$BLDSTR^DG284PT1(IVMDATA1,IVMTEXT,20,$L(IVMDATA1))
.S IVMNODE=IVMNODE+1
.S ^TMP("DG284PT",$J,IVMNODE)=IVMTEXT
F I=1:1:2 S IVMNODE=IVMNODE+1,^TMP("DG284PT",$J,IVMNODE)=" "
;
; add error reports to the mail message...
I $O(^XTMP("DGMTPERR",0))'="" D
.S IVMNODE=IVMNODE+1
.S ^TMP("DG284PT",$J,IVMNODE)="Some records were not edited due to filing errors:"
.S IVMNODE=IVMNODE+1
.S ^TMP("DG284PT",$J,IVMNODE)=" "
.S IVMTEXT="File #"
.S IVMTEXT=$$BLDSTR^DG284PT1("Record #",IVMTEXT,12,8)
.S IVMTEXT=$$BLDSTR^DG284PT1("Field #",IVMTEXT,22,7)
.S IVMTEXT=$$BLDSTR^DG284PT1("Error Message",IVMTEXT,30,13)
.S IVMNODE=IVMNODE+1
.S ^TMP("DG284PT",$J,IVMNODE)=IVMTEXT
.K IVMTEXT
.S IVMFILE=0
.F S IVMFILE=$O(^XTMP("DGMTPERR",IVMFILE)) Q:'IVMFILE D
..S IVMTEXT=IVMFILE
..S IVMIENX=0
..F S IVMIENX=$O(^XTMP("DGMTPERR",IVMFILE,IVMIENX)) Q:'IVMIENX D
...S IVMFLD=0
...F S IVMFLD=$O(^XTMP("DGMTPERR",IVMFILE,IVMIENX,IVMFLD)) Q:'IVMFLD D
....S IVMX=0
....F S IVMX=$O(^XTMP("DGMTPERR",IVMFILE,IVMIENX,IVMFLD,IVMX)) Q:'IVMX D
.....S IVMDATA=^XTMP("DGMTPERR",IVMFILE,IVMIENX,IVMFLD,IVMX)
.....S IVMTEXT=$$BLDSTR^DG284PT1(IVMIENX,IVMTEXT,12,$L(IVMIENX))
.....S IVMTEXT=$$BLDSTR^DG284PT1(IVMFLD,IVMTEXT,22,$L(IVMFLD))
.....S IVMTEXT=$$BLDSTR^DG284PT1(IVMDATA,IVMTEXT,30,$L(IVMDATA))
.....S IVMNODE=IVMNODE+1
.....S ^TMP("DG284PT",$J,IVMNODE)=IVMTEXT
.....K IVMDATA
....K IVMX
...K IVMFLD
..K IVMIENX
.K IVMFILE,IVMTEXT
;
MAIL1 D ^XMD
K ^TMP("DG284PT",$J)
Q
DG284PT2 ;ALB/SEK DG*5.3*284 POST-INSTALL TO MAILMAN MSG ; 04/20/00
+1 ;;5.3;Registration;**284,1015**;Aug 13, 1993;Build 21
+2 ;
+3 ;This routine will be run as part of the post-install for patch
+4 ;DG*5.3*284
+5 ;
+6 ;A mail message will be sent to the HEC and the user
+7 ;when the post-install is complete.
+8 ;
+9 ;
MAIL ; Send a mailman msg to user/HEC with results
+1 NEW DIFROM,%
+2 NEW IVMCX,IVMDATA,IVMDATA1,IVMFILE,IVMFLD,IVMIENX,IVMIY,IVMNODE,IVMTEXT,IVMX,I
+3 NEW X,XMDUZ,XMSUB,XMTEXT,XMY,Y,IVMSTA
+4 KILL ^TMP("DG284PT",$JOB)
+5 SET IVMCX=$$SITE^VASITE
SET IVMSTA=$PIECE(IVMCX,"^",3)
+6 SET XMSUB=IVMSTA_" - Purge of non CAT C IVM verified Means Tests"
+7 SET XMDUZ="IVM/HEC PACKAGE"
SET XMY("HARBIN,LYNNE@IVM.VA.GOV")=""
SET XMY(DUZ)=""
SET XMY(.5)=""
SET XMY("PERREAULT,JEAN@IVM.VA.GOV")=""
+8 SET XMY("PICKELSIMER,HENRY@IVM.VA.GOV")=""
SET XMY("STEFFEY,KIM@IVM.VA.GOV")=""
+9 SET XMY("ARMOUR,EDDIE@IVM.VA.GOV")=""
SET XMY("WHITFIELD,VENIS@IVM.VA.GOV")=""
+10 SET XMTEXT="^TMP(""DG284PT"",$J,"
+11 DO NOW^%DTC
SET Y=%
DO DD^%DT
+12 SET ^TMP("DG284PT",$JOB,1)="Purge of non CAT C IVM verified Means Tests"
+13 SET ^TMP("DG284PT",$JOB,2)=" "
+14 SET ^TMP("DG284PT",$JOB,3)="Facility Name: "_$PIECE(IVMCX,"^",2)_" "_Y
+15 SET ^TMP("DG284PT",$JOB,4)="Station Number: "_IVMSTA
+16 SET ^TMP("DG284PT",$JOB,5)=" "
+17 SET IVMTEXT="Income year"
+18 SET IVMTEXT=$$BLDSTR^DG284PT1("# of IVM MT purged",IVMTEXT,20,18)
+19 SET ^TMP("DG284PT",$JOB,6)=IVMTEXT
+20 SET IVMTEXT=$$REPEAT^XLFSTR("=",$LENGTH(IVMTEXT))
+21 SET ^TMP("DG284PT",$JOB,7)=IVMTEXT
+22 SET IVMIY=0
SET IVMNODE=7
+23 FOR
SET IVMIY=$ORDER(^XTMP("DGMTPAT",IVMIY))
IF 'IVMIY
QUIT
Begin DoDot:1
+24 SET IVMDATA=^XTMP("DGMTPAT",IVMIY)
+25 SET IVMTEXT=IVMIY+1700
+26 SET IVMDATA1=$JUSTIFY(+$PIECE(IVMDATA,U),6)
+27 SET IVMTEXT=$$BLDSTR^DG284PT1(IVMDATA1,IVMTEXT,20,$LENGTH(IVMDATA1))
+28 SET IVMNODE=IVMNODE+1
+29 SET ^TMP("DG284PT",$JOB,IVMNODE)=IVMTEXT
End DoDot:1
+30 FOR I=1:1:2
SET IVMNODE=IVMNODE+1
SET ^TMP("DG284PT",$JOB,IVMNODE)=" "
+31 ;
+32 ; add error reports to the mail message...
+33 IF $ORDER(^XTMP("DGMTPERR",0))'=""
Begin DoDot:1
+34 SET IVMNODE=IVMNODE+1
+35 SET ^TMP("DG284PT",$JOB,IVMNODE)="Some records were not edited due to filing errors:"
+36 SET IVMNODE=IVMNODE+1
+37 SET ^TMP("DG284PT",$JOB,IVMNODE)=" "
+38 SET IVMTEXT="File #"
+39 SET IVMTEXT=$$BLDSTR^DG284PT1("Record #",IVMTEXT,12,8)
+40 SET IVMTEXT=$$BLDSTR^DG284PT1("Field #",IVMTEXT,22,7)
+41 SET IVMTEXT=$$BLDSTR^DG284PT1("Error Message",IVMTEXT,30,13)
+42 SET IVMNODE=IVMNODE+1
+43 SET ^TMP("DG284PT",$JOB,IVMNODE)=IVMTEXT
+44 KILL IVMTEXT
+45 SET IVMFILE=0
+46 FOR
SET IVMFILE=$ORDER(^XTMP("DGMTPERR",IVMFILE))
IF 'IVMFILE
QUIT
Begin DoDot:2
+47 SET IVMTEXT=IVMFILE
+48 SET IVMIENX=0
+49 FOR
SET IVMIENX=$ORDER(^XTMP("DGMTPERR",IVMFILE,IVMIENX))
IF 'IVMIENX
QUIT
Begin DoDot:3
+50 SET IVMFLD=0
+51 FOR
SET IVMFLD=$ORDER(^XTMP("DGMTPERR",IVMFILE,IVMIENX,IVMFLD))
IF 'IVMFLD
QUIT
Begin DoDot:4
+52 SET IVMX=0
+53 FOR
SET IVMX=$ORDER(^XTMP("DGMTPERR",IVMFILE,IVMIENX,IVMFLD,IVMX))
IF 'IVMX
QUIT
Begin DoDot:5
+54 SET IVMDATA=^XTMP("DGMTPERR",IVMFILE,IVMIENX,IVMFLD,IVMX)
+55 SET IVMTEXT=$$BLDSTR^DG284PT1(IVMIENX,IVMTEXT,12,$LENGTH(IVMIENX))
+56 SET IVMTEXT=$$BLDSTR^DG284PT1(IVMFLD,IVMTEXT,22,$LENGTH(IVMFLD))
+57 SET IVMTEXT=$$BLDSTR^DG284PT1(IVMDATA,IVMTEXT,30,$LENGTH(IVMDATA))
+58 SET IVMNODE=IVMNODE+1
+59 SET ^TMP("DG284PT",$JOB,IVMNODE)=IVMTEXT
+60 KILL IVMDATA
End DoDot:5
+61 KILL IVMX
End DoDot:4
+62 KILL IVMFLD
End DoDot:3
+63 KILL IVMIENX
End DoDot:2
+64 KILL IVMFILE,IVMTEXT
End DoDot:1
+65 ;
MAIL1 DO ^XMD
+1 KILL ^TMP("DG284PT",$JOB)
+2 QUIT