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

PRCS150P.m

Go to the documentation of this file.
  1. PRCS150P ;MNT/RB-PURGE ALL OLD PRCS(410,"B" REQUEST REFERENCES
  1. ;;5.1;IFCAP;**150**;Oct 20, 2000;Build 24
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. ; Pre install routine in patch PRC*5.1*150 that will purge temporary
  1. ; request entries in cross reference ^PRCS(410,"B") that were left
  1. ; unkilled when the temporary request was changed via option
  1. ; 'CHANGE EXISTING TRANSACTION NUMBER'
  1. ; Also, temporary transaction entries in file 410 that are prior to
  1. ; 10/01/2010 will be deleted.
  1. ;;
  1. Q
  1. START ;Kill off extraneous index xref left behind when using CHANGE EXISTING TRANSACTION NUMBER option
  1. N RMSTART,REQ,IEN410,RMEND,R0,R1,TRANX,ENTDT,TOT,TOT1,HIEN
  1. K ^XTMP("PRCS150P")
  1. D NOW^%DTC S RMSTART=%
  1. S ^XTMP("PRCS150P","START COMPILE")=RMSTART
  1. S ^XTMP("PRCS150P","END COMPILE")="RUNNING"
  1. S ^XTMP("PRCS150P",0)=$$FMADD^XLFDT(RMSTART,120)_"^"_RMSTART
  1. S U="^",REQ="999-",(TOT,TOT1)=0
  1. 1 S REQ=$O(^PRCS(410,"B",REQ)),IEN410=0 G EXIT:REQ=""
  1. I REQ+0>0 G 1
  1. 2 S IEN410=$O(^PRCS(410,"B",REQ,IEN410)) G 1:IEN410=""
  1. S R0=$G(^PRCS(410,IEN410,0)),TRANX=$P(R0,U)
  1. I REQ=TRANX,$P(R0,U,3)'="",$P(R0,U,2)'="CA",'$D(^PRCS(410,"H",$P(R0,U,3),IEN410)) D
  1. . S ^PRCS(410,"H",$P(R0,U,3),IEN410)=$P($G(^PRCS(410,IEN410,1)),U,2)
  1. . S ^XTMP("PRCS150P","H",REQ,IEN410)=R0
  1. I REQ=TRANX G 4
  1. 3 ;KILL EXTRANEOUS 'B' X-REFS
  1. K ^PRCS(410,"B",REQ,IEN410)
  1. S ^XTMP("PRCS150P","B",REQ,IEN410)=R0,TOT=TOT+1
  1. G 2
  1. 4 ;CHECK TEMP TX ENTRY DATE FOR OLD ENTRIES AND DELETE ALL PRIOR TO 10/01/2010
  1. S R1=$G(^PRCS(410,IEN410,1)),ENTDT=+R1
  1. I ENTDT>3100930,$P(R0,U,2)'="CA" G 2
  1. S ^XTMP("PRCS150P","DT-CA",REQ,IEN410)=ENTDT_U_R0,TOT1=TOT1+1
  1. S HIEN=$P(^PRCS(410,0),U,3)+1
  1. S DA=IEN410,DIK="^PRCS(410," D ^DIK K DIK
  1. S $P(^PRCS(410,0),U,3)=HIEN
  1. G 2
  1. EXIT ;
  1. D NOW^%DTC S RMEND=%
  1. S ^XTMP("PRCS150P","TOTALS")=TOT_U_TOT1
  1. S ^XTMP("PRCS150P","END COMPILE")=RMEND
  1. K %,DA,HIEN
  1. Q