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

IBY652E.m

Go to the documentation of this file.
  1. IBY652E ;AITC/TAZ-Environment Check Routine for Patch 652;10 Jun 19
  1. ;;2.0;INTEGRATED BILLING;**652**;21-MAR-94;Build 23
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. N DIR,DIROUT,DIRUT,DLAYGO,DR,DTOUT,DUOUT,FILENAME,INSTCMP,IOCSITE,OK,POP,PROD,SITE,SITESYS,X,Y
  1. ;
  1. S XPDQUIT=0 ; Default to OK to install
  1. ;
  1. S XPDNOQUE=1 ; Do NOT allow Queueing
  1. ;
  1. S SITESYS=$P($$SITE^VASITE,U,3)
  1. ;
  1. I (DT>3200131) G EXIT ;Past the compliance date, no longer processing files.
  1. ;
  1. ;If site is Manila, skip environment checking.
  1. I SITESYS=358 G EXIT
  1. ;
  1. S PROD=$$PROD^XUPROD(1)
  1. S INSTCMP=$$GET1^DIQ(9.7,$O(^XPD(9.7,"B","IB*2.0*652",""),-1)_",",.02,"I")=3
  1. F SITE=405,515,518,585,662 S IOCSITE(SITE)=""
  1. ;
  1. I 'PROD,'$D(IOCSITE(SITESYS)) G EXIT ;Test account and not an IOC site
  1. ; Only IOC TEST sites and all PROD sites get here
  1. I INSTCMP,'$D(IOCSITE(SITESYS)) G EXIT ;Already installed once and not an IOC site
  1. ;
  1. S DIR(0)="FA",DIR("A")="Enter the path to the file you downloaded: "
  1. S DIR("A",1)="Enter the directory where you placed the downloaded file."
  1. S DIR("A",2)="Example: /home/directory A/directory B/"
  1. S DIR("A",3)="Do NOT include the filename."
  1. S DIR("A",4)=" "
  1. S DIR("?")="This is the directory where you downloaded the file required for patch IB*2.0*652."
  1. W ! D ^DIR K DIR I $D(DIRUT)!$D(DIROUT)!$D(DUOUT)!$D(DTOUT) S XPDQUIT=1 G EXIT
  1. S PATH=Y I $E(PATH,$L(PATH))'="/" S PATH=PATH_"/"
  1. ;
  1. S FILENAME="va"_SITESYS_".txt"
  1. ;
  1. ; Does the file exist & can I read it?
  1. D OPEN^%ZISH("INPUT",PATH,FILENAME,"R")
  1. I POP D G EXIT
  1. . S XPDQUIT=1 ;Don't load patch
  1. . W !,"Can't open File. Please check that you have the file in the "
  1. . W !,"proper directory and re-install the patch."
  1. U IO R X:5
  1. I ($P($P(X,":",2),U)'=SITESYS) D
  1. . S XPDQUIT=1 ;Don't load patch
  1. . U 0 W !,"File is for a different site. Retrieve proper file and re-install patch."
  1. D CLOSE^%ZISH("INPUT")
  1. I XPDQUIT=1 G EXIT
  1. W !,"File exists and can be read."
  1. ;
  1. S FILENAME="va"_SITESYS_"-results.txt"
  1. D OPEN^%ZISH("OUTPUT",PATH,FILENAME,"W")
  1. I POP D
  1. . S XPDQUIT=1 W !,"Could not create file. Please check that the path has proper settings to write a file then re-install patch." G EXIT
  1. U IO W "Site:"_SITESYS_"^Results of IB*2.0*652 installed on "_$$FMTE^XLFDT(DT),!
  1. D CLOSE^%ZISH("OUTPUT")
  1. ;
  1. EXIT ;End of routine.
  1. Q