DG53292M ;ALB/RKS DG*5.3*292 POST-INSTALL TO MAILMAN MSG ; 05/22/00
;;5.3;Registration;**292,1015**;AUG 13, 1993;Build 21
;
;This routine will be run as part of the post-install for patch
;DG*5.3*292
;
;A mail message will be sent to the user when the post-install is
; complete.
;
;
MAIL ; Send a mailman msg to user with results
N DIFROM,%
N DATA,FILE,IENX,NODE,TEXT,X,XMDUZ,XMSUB,XMTEXT,XMY,Y
K ^TMP("DG53292",$J)
S XMSUB="Update of DATE/TIME COMPLETED in Annual Means Tests"
S XMDUZ="DG/HEC PACKAGE",XMY(DUZ)="",XMY(.5)=""
S XMTEXT="^TMP(""DG53292"",$J,"
D NOW^%DTC S Y=% D DD^%DT
S ^TMP("DG53292",$J,1)="Update of DATE/TIME COMPLETED field in the ANNUAL MEANS TEST file"
S ^TMP("DG53292",$J,2)=" "
S TEXT="Number of records updated"
S ^TMP("DG53292",$J,3)=TEXT
S ^TMP("DG53292",$J,4)=$$REPEAT^XLFSTR("=",$L(TEXT))
S ^TMP("DG53292",$J,5)=+$G(^XTMP("DG-DTC"))
;
; add error reports to the mail message
I $O(^XTMP("DG-DTCERR",0))'="" D
. S ^TMP("DG53292",$J,6)=" "
. S NODE=7
. S ^TMP("DG53292",$J,NODE)="Some records were not edited due to filing errors:"
. S NODE=NODE+1
. S ^TMP("DG53292",$J,NODE)=" "
. S TEXT="Record #"
. S TEXT=$$BLDSTR("Error Message",TEXT,12,13)
. S NODE=NODE+1
. S ^TMP("DG53292",$J,NODE)=TEXT
. S TEXT=""
. S IENX=0
. F S IENX=$O(^XTMP("DG-DTCERR",408.31,IENX)) Q:'IENX D
. . S TEXT=IENX
. . S DATA=^XTMP("DG-DTCERR",408.31,IENX)
. . S TEXT=$$BLDSTR(DATA,TEXT,12,$L(DATA))
. . S NODE=NODE+1
. . S ^TMP("DG53292",$J,NODE)=TEXT
;
MAIL1 D ^XMD
K ^TMP("DG53292",$J)
Q
;
BLDSTR(NSTR,STR,COL,NSL) ; build a string
; Input:
; NSTR = a string to be added to STR
; STR = an existing string to which NSTR will be added
; COL = column location at which NSTR will be added to STR
; NSL = length of new string
; Output:
; returns STR with NSTR appended at the specified COL
;
Q $E(STR_$J("",COL-1),1,COL-1)_$E(NSTR_$J("",NSL),1,NSL)_$E(STR,COL+NSL,999)
DG53292M ;ALB/RKS DG*5.3*292 POST-INSTALL TO MAILMAN MSG ; 05/22/00
+1 ;;5.3;Registration;**292,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*292
+5 ;
+6 ;A mail message will be sent to the user when the post-install is
+7 ; complete.
+8 ;
+9 ;
MAIL ; Send a mailman msg to user with results
+1 NEW DIFROM,%
+2 NEW DATA,FILE,IENX,NODE,TEXT,X,XMDUZ,XMSUB,XMTEXT,XMY,Y
+3 KILL ^TMP("DG53292",$JOB)
+4 SET XMSUB="Update of DATE/TIME COMPLETED in Annual Means Tests"
+5 SET XMDUZ="DG/HEC PACKAGE"
SET XMY(DUZ)=""
SET XMY(.5)=""
+6 SET XMTEXT="^TMP(""DG53292"",$J,"
+7 DO NOW^%DTC
SET Y=%
DO DD^%DT
+8 SET ^TMP("DG53292",$JOB,1)="Update of DATE/TIME COMPLETED field in the ANNUAL MEANS TEST file"
+9 SET ^TMP("DG53292",$JOB,2)=" "
+10 SET TEXT="Number of records updated"
+11 SET ^TMP("DG53292",$JOB,3)=TEXT
+12 SET ^TMP("DG53292",$JOB,4)=$$REPEAT^XLFSTR("=",$LENGTH(TEXT))
+13 SET ^TMP("DG53292",$JOB,5)=+$GET(^XTMP("DG-DTC"))
+14 ;
+15 ; add error reports to the mail message
+16 IF $ORDER(^XTMP("DG-DTCERR",0))'=""
Begin DoDot:1
+17 SET ^TMP("DG53292",$JOB,6)=" "
+18 SET NODE=7
+19 SET ^TMP("DG53292",$JOB,NODE)="Some records were not edited due to filing errors:"
+20 SET NODE=NODE+1
+21 SET ^TMP("DG53292",$JOB,NODE)=" "
+22 SET TEXT="Record #"
+23 SET TEXT=$$BLDSTR("Error Message",TEXT,12,13)
+24 SET NODE=NODE+1
+25 SET ^TMP("DG53292",$JOB,NODE)=TEXT
+26 SET TEXT=""
+27 SET IENX=0
+28 FOR
SET IENX=$ORDER(^XTMP("DG-DTCERR",408.31,IENX))
IF 'IENX
QUIT
Begin DoDot:2
+29 SET TEXT=IENX
+30 SET DATA=^XTMP("DG-DTCERR",408.31,IENX)
+31 SET TEXT=$$BLDSTR(DATA,TEXT,12,$LENGTH(DATA))
+32 SET NODE=NODE+1
+33 SET ^TMP("DG53292",$JOB,NODE)=TEXT
End DoDot:2
End DoDot:1
+34 ;
MAIL1 DO ^XMD
+1 KILL ^TMP("DG53292",$JOB)
+2 QUIT
+3 ;
BLDSTR(NSTR,STR,COL,NSL) ; build a string
+1 ; Input:
+2 ; NSTR = a string to be added to STR
+3 ; STR = an existing string to which NSTR will be added
+4 ; COL = column location at which NSTR will be added to STR
+5 ; NSL = length of new string
+6 ; Output:
+7 ; returns STR with NSTR appended at the specified COL
+8 ;
+9 QUIT $EXTRACT(STR_$JUSTIFY("",COL-1),1,COL-1)_$EXTRACT(NSTR_$JUSTIFY("",NSL),1,NSL)_$EXTRACT(STR,COL+NSL,999)