XU8P386 ;SFISC/SO- POST INSTALL KILL OFF 'AD' XREF;8:34 AM 7 Jun 2005
;;8.0;KERNEL;**386**;Jul 10, 1995
D MES^XPDUTL("Resolving STATE(#5) pointers...")
N IEN
S IEN=0
F S IEN=$O(^XIP(5.12,IEN)) Q:'IEN D
. N CPTR,STPTR,CSTPTR
. ; CTPR = Pointer value to 5.13
. ; STPTR = Pointer value to 5 in 5.12
. ; CSTPTR = Pointer value to 5 in 5.13
. S CPTR=+$P(^XIP(5.12,IEN,0),U,3) I 'CPTR D ERR1 Q
. S STPTR=+$P(^XIP(5.12,IEN,0),U,4) I 'STPTR D ERR1 Q
. S CSTPTR=+$P(^XIP(5.13,CPTR,0),U,3) I 'CSTPTR D ERR2 Q
. I STPTR=CSTPTR Q ;We're in sync
. N DIE S DIE="^XIP(5.12,"
. N DA S DA=IEN
. N DR S DR="3////^S X=CSTPTR"
. D ^DIE
. Q
D MES^XPDUTL("Finished resolving pointers.")
D MES^XPDUTL("Deleting ""AD"" Cross Reference")
K ^XIP(5.12,"AD")
D MES^XPDUTL("Finished Deleting the ""AD"" Cross Reference")
Q
;
ERR1 ;
D MES^XPDUTL("POSTAL CODE(#5.12) Record: "_IEN_" has a broken COUNTY(#2) pointer.") Q
;
ERR2 ;
D MES^XPDUTL("COUNTY CODE(#5.13) Record: "_CPTR_" has a broken STATE(#2) pointer") Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXU8P386 1044 printed Oct 16, 2024@18:08:19 Page 2
XU8P386 ;SFISC/SO- POST INSTALL KILL OFF 'AD' XREF;8:34 AM 7 Jun 2005
+1 ;;8.0;KERNEL;**386**;Jul 10, 1995
+2 DO MES^XPDUTL("Resolving STATE(#5) pointers...")
+3 NEW IEN
+4 SET IEN=0
+5 FOR
SET IEN=$ORDER(^XIP(5.12,IEN))
if 'IEN
QUIT
Begin DoDot:1
+6 NEW CPTR,STPTR,CSTPTR
+7 ; CTPR = Pointer value to 5.13
+8 ; STPTR = Pointer value to 5 in 5.12
+9 ; CSTPTR = Pointer value to 5 in 5.13
+10 SET CPTR=+$PIECE(^XIP(5.12,IEN,0),U,3)
IF 'CPTR
DO ERR1
QUIT
+11 SET STPTR=+$PIECE(^XIP(5.12,IEN,0),U,4)
IF 'STPTR
DO ERR1
QUIT
+12 SET CSTPTR=+$PIECE(^XIP(5.13,CPTR,0),U,3)
IF 'CSTPTR
DO ERR2
QUIT
+13 ;We're in sync
IF STPTR=CSTPTR
QUIT
+14 NEW DIE
SET DIE="^XIP(5.12,"
+15 NEW DA
SET DA=IEN
+16 NEW DR
SET DR="3////^S X=CSTPTR"
+17 DO ^DIE
+18 QUIT
End DoDot:1
+19 DO MES^XPDUTL("Finished resolving pointers.")
+20 DO MES^XPDUTL("Deleting ""AD"" Cross Reference")
+21 KILL ^XIP(5.12,"AD")
+22 DO MES^XPDUTL("Finished Deleting the ""AD"" Cross Reference")
+23 QUIT
+24 ;
ERR1 ;
+1 DO MES^XPDUTL("POSTAL CODE(#5.12) Record: "_IEN_" has a broken COUNTY(#2) pointer.")
QUIT
+2 ;
ERR2 ;
+1 DO MES^XPDUTL("COUNTY CODE(#5.13) Record: "_CPTR_" has a broken STATE(#2) pointer")
QUIT