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

BDGP1006.m

Go to the documentation of this file.
  1. BDGP1006 ;IHS/OIT/LJF - PRE & POST INSTALL, ENVIRON CHECK FOR PATCH 1006
  1. ;;5.3;PIMS;**1006**;MAY 28, 2004
  1. ;
  1. CKENV ; environment check code
  1. ;Prevents "Disable Options..." and "Move Routines..." questions
  1. S XPDDIQ("XPZ1")=0,XPPDIQ("XPZ2")=0
  1. ;
  1. ; now check for patch 1004
  1. NEW PATCH S PATCH="PIMS*5.3*1005"
  1. I '$$PATCH(PATCH) D Q
  1. . W !,"You must first install "_PATCH_"." S XPDQUIT=2
  1. ;
  1. ; check for test version of patch 1004
  1. I $$TEST(PATCH) D Q
  1. . W !,"You have a TEST version of "_PATCH_" installed. Please install the released patch. . ."
  1. . S XPDQUIT=2
  1. ;
  1. Q
  1. PATCH(X) ;return 1 if patch X was installed, X=aaaa*nn.nn*nnnn
  1. ;copy of code from XPDUTL but modified to handle 4 digit IHS patch numbers
  1. Q:X'?1.4UN1"*"1.2N1"."1.2N.1(1"V",1"T").2N1"*"1.4N 0
  1. NEW NUM,I,J
  1. S I=$O(^DIC(9.4,"C",$P(X,"*"),0)) Q:'I 0
  1. S J=$O(^DIC(9.4,I,22,"B",$P(X,"*",2),0)),X=$P(X,"*",3) Q:'J 0
  1. ;check if patch is just a number
  1. Q:$O(^DIC(9.4,I,22,J,"PAH","B",X,0)) 1
  1. S NUM=$O(^DIC(9.4,I,22,J,"PAH","B",X_" SEQ"))
  1. Q (X=+NUM)
  1. ;
  1. TEST(X) ; return 1 if site is running an iteration version of patch
  1. NEW IEN
  1. S IEN=$O(^XPD(9.6,"B",X,0)) I 'IEN Q 1 ;not test version but bad xref
  1. I $G(^XPD(9.6,IEN,1,1,0))["ITERATION" Q 1
  1. Q 0
  1. ;
  1. PRE ;EP;
  1. Q
  1. ;
  1. POST ;EP; post install code
  1. Q