XMJMP2 ;ISC-SF/GMB-Print,Backup (cont.) ;05/20/2002 14:21
;;8.0;MailMan;;Jun 28, 2002
CHECK(XMDUZ,XMZ,XMZREC,XMNOGO) ;
D CONFID(XMDUZ,XMZ,XMZREC,.XMNOGO) Q:XMNOGO
D SCRAMBLE(XMZ,XMZREC,.XMNOGO)
Q
CONFID(XMDUZ,XMZ,XMZREC,XMNOGO) ; Check to see if msg is confidential
Q:XMDUZ=DUZ
Q:$$SURRACC^XMXSEC(XMDUZ,"",XMZ,XMZREC) ; "access"
S XMNOGO=1
I $D(ZTQUEUED) D Q
. S XMNOGO(1)=^TMP("XMERR",$J,XMERR,"TEXT",1)
. K XMERR,^TMP("XMERR",$J)
U IO(0) ; In case we are not printing to terminal
D NOGOID(XMZ,XMZREC)
W !,^TMP("XMERR",$J,XMERR,"TEXT",1)
K XMERR,^TMP("XMERR",$J)
U IO
Q
SCRAMBLE(XMZ,XMZREC,XMNOGO) ;
; If '$D(ZTQUEUED), and scrambled, ask the user for the password.
Q:'$D(^XMB(3.9,XMZ,"K"))!$D(XMSECURE)
I XMPAKMAN D Q
. N XMERRMSG
. S XMERRMSG=$$EZBLD^DIALOG(37416.4) ; You may not Print a secure KIDS or PackMan message.
. S XMNOGO=1
. I $D(ZTQUEUED) D Q
. . S XMNOGO(1)=XMERRMSG
. U IO(0) ; In case we are not printing to terminal
. D NOGOID(XMZ,XMZREC)
. W !,XMERRMSG
. U IO
I $D(ZTQUEUED) D Q
. S XMNOGO=1
. ;This message has been secured with a password.
. ;When a range of messages is queued to print,
. ;those messages with passwords cannot be printed because
. ;there is no opportunity to ask for the password.
. D BLD^DIALOG(34521,"","","XMNOGO")
U IO(0) ; In case we are not printing to terminal
S:'$$KEYOK^XMJMCODE(XMZ,$P(XMZREC,U,10)) XMNOGO=1
U IO
Q
NOGOID(XMZ,XMZREC,XMNOCR) ;
N XMSUBJ
S XMSUBJ=$P(XMZREC,U,1)
S:XMSUBJ["~U~" XMSUBJ=$$DECODEUP^XMXUTIL1(XMSUBJ)
W !,$$EZBLD^DIALOG(34536,XMSUBJ)," ",$$EZBLD^DIALOG(34537,XMZ) ; Subj: _XMSUBJ_ _[#_XMZ_]
W !,$$EZBLD^DIALOG(34538,$$NAME^XMXUTIL($P(XMZREC,U,2),1)) ; From:
W:'$G(XMNOCR) !
Q
NOGOMSG(XMDUZ,XMZ,XMZREC,XMNOGO) ;
N I
D NOGOID(XMZ,XMZREC)
S I=""
F S I=$O(XMNOGO(I)) Q:I="" D
. W !,XMNOGO(I)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXMJMP2 1888 printed Dec 13, 2024@02:12:13 Page 2
XMJMP2 ;ISC-SF/GMB-Print,Backup (cont.) ;05/20/2002 14:21
+1 ;;8.0;MailMan;;Jun 28, 2002
CHECK(XMDUZ,XMZ,XMZREC,XMNOGO) ;
+1 DO CONFID(XMDUZ,XMZ,XMZREC,.XMNOGO)
if XMNOGO
QUIT
+2 DO SCRAMBLE(XMZ,XMZREC,.XMNOGO)
+3 QUIT
CONFID(XMDUZ,XMZ,XMZREC,XMNOGO) ; Check to see if msg is confidential
+1 if XMDUZ=DUZ
QUIT
+2 ; "access"
if $$SURRACC^XMXSEC(XMDUZ,"",XMZ,XMZREC)
QUIT
+3 SET XMNOGO=1
+4 IF $DATA(ZTQUEUED)
Begin DoDot:1
+5 SET XMNOGO(1)=^TMP("XMERR",$JOB,XMERR,"TEXT",1)
+6 KILL XMERR,^TMP("XMERR",$JOB)
End DoDot:1
QUIT
+7 ; In case we are not printing to terminal
USE IO(0)
+8 DO NOGOID(XMZ,XMZREC)
+9 WRITE !,^TMP("XMERR",$JOB,XMERR,"TEXT",1)
+10 KILL XMERR,^TMP("XMERR",$JOB)
+11 USE IO
+12 QUIT
SCRAMBLE(XMZ,XMZREC,XMNOGO) ;
+1 ; If '$D(ZTQUEUED), and scrambled, ask the user for the password.
+2 if '$DATA(^XMB(3.9,XMZ,"K"))!$DATA(XMSECURE)
QUIT
+3 IF XMPAKMAN
Begin DoDot:1
+4 NEW XMERRMSG
+5 ; You may not Print a secure KIDS or PackMan message.
SET XMERRMSG=$$EZBLD^DIALOG(37416.4)
+6 SET XMNOGO=1
+7 IF $DATA(ZTQUEUED)
Begin DoDot:2
+8 SET XMNOGO(1)=XMERRMSG
End DoDot:2
QUIT
+9 ; In case we are not printing to terminal
USE IO(0)
+10 DO NOGOID(XMZ,XMZREC)
+11 WRITE !,XMERRMSG
+12 USE IO
End DoDot:1
QUIT
+13 IF $DATA(ZTQUEUED)
Begin DoDot:1
+14 SET XMNOGO=1
+15 ;This message has been secured with a password.
+16 ;When a range of messages is queued to print,
+17 ;those messages with passwords cannot be printed because
+18 ;there is no opportunity to ask for the password.
+19 DO BLD^DIALOG(34521,"","","XMNOGO")
End DoDot:1
QUIT
+20 ; In case we are not printing to terminal
USE IO(0)
+21 if '$$KEYOK^XMJMCODE(XMZ,$PIECE(XMZREC,U,10))
SET XMNOGO=1
+22 USE IO
+23 QUIT
NOGOID(XMZ,XMZREC,XMNOCR) ;
+1 NEW XMSUBJ
+2 SET XMSUBJ=$PIECE(XMZREC,U,1)
+3 if XMSUBJ["~U~"
SET XMSUBJ=$$DECODEUP^XMXUTIL1(XMSUBJ)
+4 ; Subj: _XMSUBJ_ _[#_XMZ_]
WRITE !,$$EZBLD^DIALOG(34536,XMSUBJ)," ",$$EZBLD^DIALOG(34537,XMZ)
+5 ; From:
WRITE !,$$EZBLD^DIALOG(34538,$$NAME^XMXUTIL($PIECE(XMZREC,U,2),1))
+6 if '$GET(XMNOCR)
WRITE !
+7 QUIT
NOGOMSG(XMDUZ,XMZ,XMZREC,XMNOGO) ;
+1 NEW I
+2 DO NOGOID(XMZ,XMZREC)
+3 SET I=""
+4 FOR
SET I=$ORDER(XMNOGO(I))
if I=""
QUIT
Begin DoDot:1
+5 WRITE !,XMNOGO(I)
End DoDot:1
+6 QUIT