XMAH1 ;ISC-SF/GMB-Reply to a message API ;04/17/2002 07:33
;;8.0;MailMan;;Jun 28, 2002
; Was (WASH ISC)/CAP
;
; Entry points (DBIA 1232):
; ^XMAH1 Interactive respond to a message
; ENTA^XMAH1 Interactive respond to a message
;
ENTA ; Interactive respond to a message
; Needs:
; XMDUZ user ID
; XMK basket number
; XMZ message number
; Optional:
; XMDF If $D(XMDF), then addressing restrictions are ignored.
N XMV,XMSUBJ,XMFROM,XMINSTR,XMKN,XMIEN,XMRESP,XMRESPSO,XMPAKMAN,XMSECURE,XMABORT
S XMABORT=0
D INIT(XMDUZ,XMK,.XMKN,XMZ,.XMSUBJ,.XMFROM,.XMINSTR,.XMIEN,.XMRESPSO,.XMRESP,.XMABORT) Q:XMABORT
D REPLY^XMJMR(XMDUZ,.XMK,.XMKN,XMZ,XMSUBJ,XMFROM,.XMINSTR,XMIEN,XMRESPSO,0,XMRESP)
Q
INIT(XMDUZ,XMK,XMKN,XMZ,XMSUBJ,XMFROM,XMINSTR,XMIEN,XMRESPSO,XMRESP,XMABORT) ;
N XMIM,XMIU,XMZREC
D INITAPI^XMVVITAE
K XMERR,^TMP("XMERR",$J)
S XMZREC=^XMB(3.9,XMZ,0)
I '$$REPLY^XMXSEC(XMDUZ,XMZ,XMZREC) D SHOW^XMJERR S XMABORT=1 Q
I $D(XMDF) S XMINSTR("ADDR FLAGS")="R" ; no addressing restrictions
D INMSG^XMXUTIL2(XMDUZ,0,XMZ,XMZREC,"I",.XMIM,.XMINSTR,.XMIU)
I $D(XMINSTR("SCR HINT")),'$D(XMSECURE),'$$KEYOK^XMJMCODE(XMZ,XMINSTR("SCR HINT")) S XMABORT=1 Q
S XMSUBJ=XMIM("SUBJ")
S XMFROM=XMIM("FROM")
S XMRESPSO=XMIM("RESPS")
S XMIEN=XMIU("IEN")
S XMRESP=XMIU("RESP")
S XMPAKMAN=$S(XMINSTR("TYPE")["X":1,XMINSTR("TYPE")["K":1,1:0)
S XMKN=$P(^XMB(3.7,XMDUZ,2,XMK,0),U,1)
Q
XMAH1 ;ISC-SF/GMB-Reply to a message API ;04/17/2002 07:33
+1 ;;8.0;MailMan;;Jun 28, 2002
+2 ; Was (WASH ISC)/CAP
+3 ;
+4 ; Entry points (DBIA 1232):
+5 ; ^XMAH1 Interactive respond to a message
+6 ; ENTA^XMAH1 Interactive respond to a message
+7 ;
ENTA ; Interactive respond to a message
+1 ; Needs:
+2 ; XMDUZ user ID
+3 ; XMK basket number
+4 ; XMZ message number
+5 ; Optional:
+6 ; XMDF If $D(XMDF), then addressing restrictions are ignored.
+7 NEW XMV,XMSUBJ,XMFROM,XMINSTR,XMKN,XMIEN,XMRESP,XMRESPSO,XMPAKMAN,XMSECURE,XMABORT
+8 SET XMABORT=0
+9 DO INIT(XMDUZ,XMK,.XMKN,XMZ,.XMSUBJ,.XMFROM,.XMINSTR,.XMIEN,.XMRESPSO,.XMRESP,.XMABORT)
IF XMABORT
QUIT
+10 DO REPLY^XMJMR(XMDUZ,.XMK,.XMKN,XMZ,XMSUBJ,XMFROM,.XMINSTR,XMIEN,XMRESPSO,0,XMRESP)
+11 QUIT
INIT(XMDUZ,XMK,XMKN,XMZ,XMSUBJ,XMFROM,XMINSTR,XMIEN,XMRESPSO,XMRESP,XMABORT) ;
+1 NEW XMIM,XMIU,XMZREC
+2 DO INITAPI^XMVVITAE
+3 KILL XMERR,^TMP("XMERR",$JOB)
+4 SET XMZREC=^XMB(3.9,XMZ,0)
+5 IF '$$REPLY^XMXSEC(XMDUZ,XMZ,XMZREC)
DO SHOW^XMJERR
SET XMABORT=1
QUIT
+6 ; no addressing restrictions
IF $DATA(XMDF)
SET XMINSTR("ADDR FLAGS")="R"
+7 DO INMSG^XMXUTIL2(XMDUZ,0,XMZ,XMZREC,"I",.XMIM,.XMINSTR,.XMIU)
+8 IF $DATA(XMINSTR("SCR HINT"))
IF '$DATA(XMSECURE)
IF '$$KEYOK^XMJMCODE(XMZ,XMINSTR("SCR HINT"))
SET XMABORT=1
QUIT
+9 SET XMSUBJ=XMIM("SUBJ")
+10 SET XMFROM=XMIM("FROM")
+11 SET XMRESPSO=XMIM("RESPS")
+12 SET XMIEN=XMIU("IEN")
+13 SET XMRESP=XMIU("RESP")
+14 SET XMPAKMAN=$SELECT(XMINSTR("TYPE")["X":1,XMINSTR("TYPE")["K":1,1:0)
+15 SET XMKN=$PIECE(^XMB(3.7,XMDUZ,2,XMK,0),U,1)
+16 QUIT