XMJMBULL ;ISC-SF/GMB-Manual Bulletin ;08/08/2000 14:11
;;8.0;MailMan;;Jun 28, 2002
; Replaces BULL^XMB (ISC-WASH/THM/RWF/CAP)
; Entry points used by MailMan options (not covered by DBIA):
; BULLETIN XMPOST
BULLETIN ; Manually post a bulletin
N XMBIEN,XMBNAME,XMPARM,XMINSTR,XMABORT
S XMABORT=0
D WHICH(.XMBIEN,.XMBNAME,.XMABORT) Q:XMABORT
D GETPARMS(XMBIEN,.XMPARM,.XMINSTR,.XMABORT) Q:XMABORT
D BULLETIN^XMKPO($G(XMDUZ,DUZ),XMBNAME,XMBIEN,.XMPARM,"","",.XMINSTR)
Q
WHICH(XMBIEN,XMBNAME,XMABORT) ;
N DIC
S DIC(0)="AEQM",DIC="^XMB(3.6,"
D ^DIC I Y=-1 S XMABORT=1 Q
S XMBIEN=+Y
S XMBNAME=$P(Y,U,2)
Q
GETPARMS(XMBIEN,XMPARM,XMINSTR,XMABORT) ;
N I,XMREC,XMI,DIR,Y,X,DIRUT,XMNOW
S I=0
F S I=$O(^XMB(3.6,XMBIEN,1,I)) Q:'I D Q:XMABORT
. S XMREC=^XMB(3.6,XMBIEN,1,I,0)
. W !,XMREC
. F Q:XMREC'?.E1"|".N1"|".E D Q:XMABORT
. . S XMI=+$P(XMREC,"|",2)
. . S XMREC=$P(XMREC,"|",1)_$P(XMREC,"|",3,999)
. . I XMI<0!(XMI>100) D Q
. . . S XMABORT=1
. . . W !,$$EZBLD^DIALOG(34661,XMI) ; '|1|' is not a valid parameter. Aborting!
. . Q:$D(XMPARM(XMI))
. . S DIR("A")=$$EZBLD^DIALOG(34660,XMI) ; Enter parameter |1|
. . S DIR(0)="F^1:30"
. . S DIR("??")="^D HELP^XMJMBULL"
. . D ^DIR I $D(DIRUT) S XMABORT=1 Q
. . S XMPARM(XMI)=Y
Q:XMABORT
S DIR("A")=$$EZBLD^DIALOG(34662) ; When do you want to send the bulletin?"
S XMNOW=$$EZBLD^DIALOG(37007) ; NOW
S DIR("B")=XMNOW
S DIR(0)="DA^NOW::EFTX"
D ^DIR I $D(DIRUT) S XMABORT=1 Q
S:X'=XMNOW XMINSTR("LATER")=Y
Q
HELP ;
I '$D(^XMB(3.6,XMBIEN,4,XMI,1,1,0)) Q
N I
S I=0
F S I=$O(^XMB(3.6,XMBIEN,4,XMI,1,I)) Q:'I W !,^(I,0)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXMJMBULL 1657 printed Oct 16, 2024@18:12:36 Page 2
XMJMBULL ;ISC-SF/GMB-Manual Bulletin ;08/08/2000 14:11
+1 ;;8.0;MailMan;;Jun 28, 2002
+2 ; Replaces BULL^XMB (ISC-WASH/THM/RWF/CAP)
+3 ; Entry points used by MailMan options (not covered by DBIA):
+4 ; BULLETIN XMPOST
BULLETIN ; Manually post a bulletin
+1 NEW XMBIEN,XMBNAME,XMPARM,XMINSTR,XMABORT
+2 SET XMABORT=0
+3 DO WHICH(.XMBIEN,.XMBNAME,.XMABORT)
if XMABORT
QUIT
+4 DO GETPARMS(XMBIEN,.XMPARM,.XMINSTR,.XMABORT)
if XMABORT
QUIT
+5 DO BULLETIN^XMKPO($GET(XMDUZ,DUZ),XMBNAME,XMBIEN,.XMPARM,"","",.XMINSTR)
+6 QUIT
WHICH(XMBIEN,XMBNAME,XMABORT) ;
+1 NEW DIC
+2 SET DIC(0)="AEQM"
SET DIC="^XMB(3.6,"
+3 DO ^DIC
IF Y=-1
SET XMABORT=1
QUIT
+4 SET XMBIEN=+Y
+5 SET XMBNAME=$PIECE(Y,U,2)
+6 QUIT
GETPARMS(XMBIEN,XMPARM,XMINSTR,XMABORT) ;
+1 NEW I,XMREC,XMI,DIR,Y,X,DIRUT,XMNOW
+2 SET I=0
+3 FOR
SET I=$ORDER(^XMB(3.6,XMBIEN,1,I))
if 'I
QUIT
Begin DoDot:1
+4 SET XMREC=^XMB(3.6,XMBIEN,1,I,0)
+5 WRITE !,XMREC
+6 FOR
if XMREC'?.E1"|".N1"|".E
QUIT
Begin DoDot:2
+7 SET XMI=+$PIECE(XMREC,"|",2)
+8 SET XMREC=$PIECE(XMREC,"|",1)_$PIECE(XMREC,"|",3,999)
+9 IF XMI<0!(XMI>100)
Begin DoDot:3
+10 SET XMABORT=1
+11 ; '|1|' is not a valid parameter. Aborting!
WRITE !,$$EZBLD^DIALOG(34661,XMI)
End DoDot:3
QUIT
+12 if $DATA(XMPARM(XMI))
QUIT
+13 ; Enter parameter |1|
SET DIR("A")=$$EZBLD^DIALOG(34660,XMI)
+14 SET DIR(0)="F^1:30"
+15 SET DIR("??")="^D HELP^XMJMBULL"
+16 DO ^DIR
IF $DATA(DIRUT)
SET XMABORT=1
QUIT
+17 SET XMPARM(XMI)=Y
End DoDot:2
if XMABORT
QUIT
End DoDot:1
if XMABORT
QUIT
+18 if XMABORT
QUIT
+19 ; When do you want to send the bulletin?"
SET DIR("A")=$$EZBLD^DIALOG(34662)
+20 ; NOW
SET XMNOW=$$EZBLD^DIALOG(37007)
+21 SET DIR("B")=XMNOW
+22 SET DIR(0)="DA^NOW::EFTX"
+23 DO ^DIR
IF $DATA(DIRUT)
SET XMABORT=1
QUIT
+24 if X'=XMNOW
SET XMINSTR("LATER")=Y
+25 QUIT
HELP ;
+1 IF '$DATA(^XMB(3.6,XMBIEN,4,XMI,1,1,0))
QUIT
+2 NEW I
+3 SET I=0
+4 FOR
SET I=$ORDER(^XMB(3.6,XMBIEN,4,XMI,1,I))
if 'I
QUIT
WRITE !,^(I,0)
+5 QUIT