Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XMRPCTSA

XMRPCTSA.m

Go to the documentation of this file.
  1. XMRPCTSA ;(KC-VAMC)/XXX-Steal TWIX's from PCTS Host [RCVR] ;04/08/98 10:39
  1. ;;8.0;MailMan;;Jun 28, 2002
  1. ; Create a Mailgroup called PCTS, all messages will be sent to its
  1. ; membership. This can be called from a mailman script, it should
  1. ; look something like this:
  1. ;
  1. ; O H=VHA.DMIA,P=SCP <---- Domain name and protocol are meaningless
  1. ; C MINI
  1. ; L ogin:
  1. ; S pcts
  1. ; L CODE:
  1. ; X W "PCTS RUCHxxx",! <---- This is your local routing indicator
  1. ; X S XMRPCTS0=XMCI+1
  1. ; X D ^XMRPCTS <---- Call this routine
  1. ; X K XMRPCTS0
  1. ;-----------------
  1. ; Mailman Host: VHA.DMIA, Physical Link: MINIOUT
  1. ;-------------------------------------------------------------
  1. XM N %,DIC,X,XMDF,XMTEXT,XXX,XMY,XMZ,Y
  1. S %=$$DSP("<==Locally Mailing AMS Message"),XMRPCTS("R")=XMRPCTS("R")+1
  1. N XM,XMCHAN,ZTSK,ZTQUEUED S ZTSK=1,ZTQUEUED=1,XMCHAN=1
  1. S XMDF=1,U="^",XMTEXT="^TMP($J,",XMDUZ=.5
  1. S XMY("G.PCTS")="",XMY(XMDUZ)="",XXX=XMSUB D ^XMD S XMLMN=XMZ
  1. ;--Make it look like a network message so we can track some info
  1. S ^XMB(3.9,XMZ,2,.001,0)="Received: from PCTS/AMS by "_^XMB("NETNAME")_" via DMI/MM translation with SSP."
  1. S ^XMB(3.9,XMZ,2,.002,0)="Subject: "_XXX
  1. S ^XMB(3.9,XMZ,2,.003,0)="Date: "_$$INDT^XMXUTIL1($$NOW^XLFDT())
  1. S ^XMB(3.9,XMZ,2,.004,0)="Message-ID:<"_$P(XMMN," ")_"@AMS>"
  1. S ^XMB(3.9,XMZ,2,.005,0)="From: The Austin AMS System"
  1. S ^XMB(3.9,XMZ,2,.006,0)="To: G.PCTS"
  1. S ^XMB(3.9,XMZ,2,.007,0)="X-Another service provided by DHCP"
  1. S ^XMB(3.9,XMZ,2,.008,0)=""
  1. Q
  1. REPLY ;Let AMS know we have the message OK and what our local msg number is
  1. S %=$$DSP("<==MAK2, Message #"_XMLMN_" Removed from AMS Queue")
  1. U IO W "MAK2",!,XMMN,!,"#"_XMLMN,!,XMET,XMCR Q
  1. ;
  1. INIT ;called from XMRPCTS & XMRPCTS0
  1. S %=$$DSP("==>Initializing<==")
  1. I '$G(XMCI) S XMCI=$S($G(XMRPCTS0):XMRPCTS0,1:999999) I XMCI>999 S ER=1,Y="Lost the counter to the script processor (XMCI)."
  1. S %=0,XMCR=$C(13),XMLF=$C(10),XMET=$C(4),XMSH=$C(1)
  1. D TERMON
  1. K ^TMP($J) ;Scratch Space
  1. S XMLPC=0 ;Longitudinal Parity Check for SSP
  1. S XMDH="0123456789ABCDEF" ; for LPC calculations
  1. Q
  1. ;
  1. TERMON ;Need to change read terminators
  1. I ^%ZOSF("OS")["DSM" U IO:TERM=$C(3,4,13,27) Q
  1. I ^%ZOSF("OS")["MSM" U IO:(::::::::$C(3,4,13,27)) Q
  1. I ^%ZOSF("OS")["OpenM-NT" U $I:("":"+I-T":$C(3,4,13,27)) Q
  1. W XMRPCTS("ERROR"),"Terminators not defined for this operating system",!
  1. Q
  1. ;
  1. DSP(XMTRAN) D TRAN^XMC1
  1. Q ""
  1. ;
  1. ERR D ^%ZTER S %=$$DSP("ERROR captured in error trap !!!")
  1. G UNWIND^%ZTER