ENTINSD ;WOIFO/SAB - IT NON-SPACE FILE LOCATION DD CALLS ;2/4/2008
;;7.0;ENGINEERING;**87**;Aug 17, 1993;Build 16
Q
;
NSPT(DA,ENF) ; NON-SPACE FILE LOCATION triggers of the NON-SPACE FILE PERSON
; and NON-SPACE FILE DATE/TIME fields
; called by new-style MUMPS field x-ref logic on NON-SPACE FILE
; LOCATION (#90) field of file 6914 when value changes
;
; input
; DA - ien of entry in file 6914
; ENF - flag, "S" for set logic or "K" for kill logic
;
Q:'$G(DA) ; ien required
Q:"^S^K^"'[("^"_ENF_"^") ; must be S or K
;
N ENFDA
S ENFDA(6914,DA_",",90.1)=$S(ENF="S":DUZ,1:"@") ; non-space file person
S ENFDA(6914,DA_",",90.2)=$S(ENF="S":$$NOW^XLFDT(),1:"@") ; date/time
D FILE^DIE("","ENFDA")
Q
;
BUL(DA) ; Send a bulletin
; called by new-style MUMPS record x-ref set logic on NON-SPACE FILE
; LOCATION (#90) field of file 6914 when value changes
;
; input
; DA - ien of entry in file 6914
;
Q:'$G(DA) ; ien required
;
; new all input and output variables of the bulletin API
N XMDUZ,XMBNAME,XMPARM,XMBODY,XMTO,XMINSTR,XMATTACH,XMZ,XMERR
;
; set variables for the bulletin API
S XMDUZ=DUZ ; sender
S XMBNAME="EN NON-SPACE FILE LOC" ; bulletin name
S XMTO("G.EN NON-SPACE FILE LOC")="" ; mail group
S XMTO(DUZ)=""
S XMPARM(1)=DA ; equipment entry #
S XMPARM(2)=$$GET1^DIQ(6914,DA_",",90) ; non-space file location
S XMPARM(3)=$$GET1^DIQ(6914,DA_",",90.1) ; non-space file person
S XMPARM(4)=$$GET1^DIQ(6914,DA_",",90.2) ; non-space file date/time
;
; send the bulletin
D SENDBULL^XMXAPI(XMDUZ,XMBNAME,.XMPARM,"",.XMTO)
Q
;
DELNSP(DA) ; Delete Non-Space File Location (#90) field value
; called by new-style MUMPS field x-ref set logic on LOCATION (#24)
; field of file 6914 when LOCATION value changes
;
; input
; DA - ien of entry in file 6914
;
Q:'$G(DA) ; ien required
;
N ENFDA
S ENFDA(6914,DA_",",90)="@"
D FILE^DIE("","ENFDA")
Q
; ENTINSD
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENTINSD 1976 printed Nov 22, 2024@17:05:56 Page 2
ENTINSD ;WOIFO/SAB - IT NON-SPACE FILE LOCATION DD CALLS ;2/4/2008
+1 ;;7.0;ENGINEERING;**87**;Aug 17, 1993;Build 16
+2 QUIT
+3 ;
NSPT(DA,ENF) ; NON-SPACE FILE LOCATION triggers of the NON-SPACE FILE PERSON
+1 ; and NON-SPACE FILE DATE/TIME fields
+2 ; called by new-style MUMPS field x-ref logic on NON-SPACE FILE
+3 ; LOCATION (#90) field of file 6914 when value changes
+4 ;
+5 ; input
+6 ; DA - ien of entry in file 6914
+7 ; ENF - flag, "S" for set logic or "K" for kill logic
+8 ;
+9 ; ien required
if '$GET(DA)
QUIT
+10 ; must be S or K
if "^S^K^"'[("^"_ENF_"^")
QUIT
+11 ;
+12 NEW ENFDA
+13 ; non-space file person
SET ENFDA(6914,DA_",",90.1)=$SELECT(ENF="S":DUZ,1:"@")
+14 ; date/time
SET ENFDA(6914,DA_",",90.2)=$SELECT(ENF="S":$$NOW^XLFDT(),1:"@")
+15 DO FILE^DIE("","ENFDA")
+16 QUIT
+17 ;
BUL(DA) ; Send a bulletin
+1 ; called by new-style MUMPS record x-ref set logic on NON-SPACE FILE
+2 ; LOCATION (#90) field of file 6914 when value changes
+3 ;
+4 ; input
+5 ; DA - ien of entry in file 6914
+6 ;
+7 ; ien required
if '$GET(DA)
QUIT
+8 ;
+9 ; new all input and output variables of the bulletin API
+10 NEW XMDUZ,XMBNAME,XMPARM,XMBODY,XMTO,XMINSTR,XMATTACH,XMZ,XMERR
+11 ;
+12 ; set variables for the bulletin API
+13 ; sender
SET XMDUZ=DUZ
+14 ; bulletin name
SET XMBNAME="EN NON-SPACE FILE LOC"
+15 ; mail group
SET XMTO("G.EN NON-SPACE FILE LOC")=""
+16 SET XMTO(DUZ)=""
+17 ; equipment entry #
SET XMPARM(1)=DA
+18 ; non-space file location
SET XMPARM(2)=$$GET1^DIQ(6914,DA_",",90)
+19 ; non-space file person
SET XMPARM(3)=$$GET1^DIQ(6914,DA_",",90.1)
+20 ; non-space file date/time
SET XMPARM(4)=$$GET1^DIQ(6914,DA_",",90.2)
+21 ;
+22 ; send the bulletin
+23 DO SENDBULL^XMXAPI(XMDUZ,XMBNAME,.XMPARM,"",.XMTO)
+24 QUIT
+25 ;
DELNSP(DA) ; Delete Non-Space File Location (#90) field value
+1 ; called by new-style MUMPS field x-ref set logic on LOCATION (#24)
+2 ; field of file 6914 when LOCATION value changes
+3 ;
+4 ; input
+5 ; DA - ien of entry in file 6914
+6 ;
+7 ; ien required
if '$GET(DA)
QUIT
+8 ;
+9 NEW ENFDA
+10 SET ENFDA(6914,DA_",",90)="@"
+11 DO FILE^DIE("","ENFDA")
+12 QUIT
+13 ; ENTINSD