GMRGXUPD ;HIRMFO/RM-POST BUILD TASKS FOR PATCH GMRG*3.0*1 ;4/11/96
;;3.0;Text Generator;**1**;Jan 24, 1996
EN1 ; ENTRY FROM BUILD TO PERFORM POST BUILD TASKS
D KILLDD,SET6
Q
KILLDD ; KILL BAD ^DD NODES FROM AGGREGATE TERM (124.2) FILE. SEE DBIA
; #1412, WHICH AUTHORIZES THIS DD KILL.
K ^DD(124.2,0,"DIK"),^DD(124.2,0,"DIKOLD"),^DD(124.21,0,"DIK")
Q
SET6 ; LOOP THROUGH GMR TEXT (124.3) FILE ENTRIES AND SET THE DATE LAST
; UPDATED (6) FIELD TO LATEST DATE IN AUDIT TRAIL MULTIPLE.
N DA,DIE,DR,GMRGAUD,GMRGLAUD,GMRGSEL,GMRGDOT,X
D BMES^XPDUTL("Populating the Date Last Updated (6) field of the GMR Text (124.3) file...")
S DA=0 F S DA=$O(^GMR(124.3,DA)) Q:DA'>0 D
. S GMRGLAUD=$P($G(^GMR(124.3,DA,0)),"^",3)
. S GMRGSEL=0 F S GMRGSEL=$O(^GMR(124.3,DA,1,GMRGSEL)) Q:GMRGSEL'>0 D
. . S GMRGAUD=0 F S GMRGAUD=$O(^GMR(124.3,DA,1,GMRGSEL,2,GMRGAUD)) Q:GMRGAUD'>0 D
. . . S X=$P($G(^GMR(124.3,DA,1,GMRGSEL,2,GMRGAUD,0)),"^")
. . . I X>GMRGLAUD S GMRGLAUD=X
. . . Q
. . Q
. I GMRGLAUD S DIE="^GMR(124.3,",DR="6////"_GMRGLAUD D ^DIE W:'$R(100) "."
. Q
D BMES^XPDUTL(" ")
D BMES^XPDUTL("Re-indexing ""AC"" cross-refence in Children multiple...")
K DA S DA(1)=0 F S DA(1)=$O(^GMRD(124.2,DA(1))) Q:DA(1)'>0 D
. K ^GMRD(124.2,DA(1),1,"AC")
. S DA=0 F S DA=$O(^GMRD(124.2,DA(1),1,DA)) Q:DA'>0 D
. . S DIK="^GMRD(124.2,"_DA(1)_",1,",DIK(1)="1^AC" D EN1^DIK
. . Q
. W:'$R(50) "."
. Q
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRGXUPD 1471 printed Oct 16, 2024@17:56:33 Page 2
GMRGXUPD ;HIRMFO/RM-POST BUILD TASKS FOR PATCH GMRG*3.0*1 ;4/11/96
+1 ;;3.0;Text Generator;**1**;Jan 24, 1996
EN1 ; ENTRY FROM BUILD TO PERFORM POST BUILD TASKS
+1 DO KILLDD
DO SET6
+2 QUIT
KILLDD ; KILL BAD ^DD NODES FROM AGGREGATE TERM (124.2) FILE. SEE DBIA
+1 ; #1412, WHICH AUTHORIZES THIS DD KILL.
+2 KILL ^DD(124.2,0,"DIK"),^DD(124.2,0,"DIKOLD"),^DD(124.21,0,"DIK")
+3 QUIT
SET6 ; LOOP THROUGH GMR TEXT (124.3) FILE ENTRIES AND SET THE DATE LAST
+1 ; UPDATED (6) FIELD TO LATEST DATE IN AUDIT TRAIL MULTIPLE.
+2 NEW DA,DIE,DR,GMRGAUD,GMRGLAUD,GMRGSEL,GMRGDOT,X
+3 DO BMES^XPDUTL("Populating the Date Last Updated (6) field of the GMR Text (124.3) file...")
+4 SET DA=0
FOR
SET DA=$ORDER(^GMR(124.3,DA))
if DA'>0
QUIT
Begin DoDot:1
+5 SET GMRGLAUD=$PIECE($GET(^GMR(124.3,DA,0)),"^",3)
+6 SET GMRGSEL=0
FOR
SET GMRGSEL=$ORDER(^GMR(124.3,DA,1,GMRGSEL))
if GMRGSEL'>0
QUIT
Begin DoDot:2
+7 SET GMRGAUD=0
FOR
SET GMRGAUD=$ORDER(^GMR(124.3,DA,1,GMRGSEL,2,GMRGAUD))
if GMRGAUD'>0
QUIT
Begin DoDot:3
+8 SET X=$PIECE($GET(^GMR(124.3,DA,1,GMRGSEL,2,GMRGAUD,0)),"^")
+9 IF X>GMRGLAUD
SET GMRGLAUD=X
+10 QUIT
End DoDot:3
+11 QUIT
End DoDot:2
+12 IF GMRGLAUD
SET DIE="^GMR(124.3,"
SET DR="6////"_GMRGLAUD
DO ^DIE
if '$RANDOM(100)
WRITE "."
+13 QUIT
End DoDot:1
+14 DO BMES^XPDUTL(" ")
+15 DO BMES^XPDUTL("Re-indexing ""AC"" cross-refence in Children multiple...")
+16 KILL DA
SET DA(1)=0
FOR
SET DA(1)=$ORDER(^GMRD(124.2,DA(1)))
if DA(1)'>0
QUIT
Begin DoDot:1
+17 KILL ^GMRD(124.2,DA(1),1,"AC")
+18 SET DA=0
FOR
SET DA=$ORDER(^GMRD(124.2,DA(1),1,DA))
if DA'>0
QUIT
Begin DoDot:2
+19 SET DIK="^GMRD(124.2,"_DA(1)_",1,"
SET DIK(1)="1^AC"
DO EN1^DIK
+20 QUIT
End DoDot:2
+21 if '$RANDOM(50)
WRITE "."
+22 QUIT
End DoDot:1
+23 QUIT