ACR21PST ;IHS/OIRM/DSD/AEF - VERSION 2.1 POST INSTALL ROUTINE [ 11/01/2001 10:01 AM ]
;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
;
EN ;EP -- MAIN ENTRY POINT
;
D ^XBKVAR
D COMP
D SYSDEF
D SCRIPT1
Q
COMP ;----- COMPILE PRINT TEMPLATES
;
; This subroutine recompiles all the compiled ARMS print
; templates
;
N ACRIEN,ACRTEMP,DMAX,X,Y
D BMES^XPDUTL("Recompiling print templates...")
S ACRTEMP="ACR"
F S ACRTEMP=$O(^DIPT("B",ACRTEMP)) Q:ACRTEMP']"" Q:$E(ACRTEMP,1,3)'="ACR" D
. S ACRIEN=0
. F S ACRIEN=$O(^DIPT("B",ACRTEMP,ACRIEN)) Q:'ACRIEN D
. . S X=$P($G(^DIPT(ACRIEN,"ROU")),U,2)
. . Q:X']""
. . S Y=ACRIEN
. . S DMAX=$$ROUSIZE^DILF
. . D EN^DIPZ
Q
SYSDEF ;----- UPDATE SYSTEM DEFAULTS
;
; This update copies the Agency Location Code and
; Regional Finance Center code from the 1166 AFP SYSTEM
; PARAMETERS file to the FMS SYSTEM DEFAULTS file.
;
N ACRALC,ACRECS,ACRRFC,ACRSYS,DA,DIE,DR,X,Y
D BMES^XPDUTL("Updating System Defaults...")
S ACRSYS=$O(^AFSLPRM(0))
I 'ACRSYS D Q
. D BMES^XPDUTL("Can't locate AGENCY LOCATION CODE or REGIONAL")
. D BMES^XPDUTL("FINANCE CENTER, please notify developer.")
S ACRALC=$P($G(^AFSLPRM(ACRSYS,2)),U,2)
S ACRRFC=$P($G(^AFSLPRM(ACRSYS,2)),U,3)
S ACRECS="/usr/spool/afsdata/"
S DA=0
F S DA=$O(^ACRSYS(DA)) Q:'DA D
. S DIE="^ACRSYS("
. S DR="402.1///^S X=ACRALC;402.2///^S X=ACRRFC;402.3///^S X=ACRECS"
. D ^DIE
Q
SCRIPT1 ;----- INSTALL odocget UNIX SCRIPT
;
; Copies UNIX script contained in file acr_0210.s1 to
; /usr/spool/afsdata/odocget
;
N ACRDIR,ACRPATH,X,Y
D BMES^XPDUTL("Installing odocget UNIX script")
S X=$$TERMINAL^%HOSTCMD("pwd > acrdir")
D OPEN^%ZISH("FILE","","acrdir","R")
I POP D Q
. D BMES^XPDUTL("Unable to install 'odocget' UNIX script")
. D BMES^XPDUTL("Please notify developer")
U IO
R X:DTIME
S ACRDIR=X
D CLOSE^%ZISH("FILE")
S X=$$TERMINAL^%HOSTCMD("rm acrdir")
;
S X=$$TERMINAL^%HOSTCMD("find / acr_0210.s1 > acr1 2>&1")
S X=$$TERMINAL^%HOSTCMD("cat acr1 | grep acr_0210.s1 > acr2")
D OPEN^%ZISH("FILE","","acr2","R")
I POP D Q
. D BMES^XPDUTL("Unable to install 'odocget' UNIX script")
. D BMES^XPDUTL("Please notify developer")
U IO
R X:DTIME
S ACRPATH=X
S ACRPATH=$P(X,"/",1,$L(X,"/")-1)
D CLOSE^%ZISH("FILE")
S X=$$TERMINAL^%HOSTCMD("rm acr1")
S X=$$TERMINAL^%HOSTCMD("rm acr2")
;
S X=$$TERMINAL^%HOSTCMD("cp "_ACRPATH_"/acr_0210.s1"_" /usr/spool/afsdata/odocget")
S X=$$TERMINAL^%HOSTCMD("chmod a+x /usr/spool/afsdata/odocget")
Q
ACR21PST ;IHS/OIRM/DSD/AEF - VERSION 2.1 POST INSTALL ROUTINE [ 11/01/2001 10:01 AM ]
+1 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
+2 ;
EN ;EP -- MAIN ENTRY POINT
+1 ;
+2 DO ^XBKVAR
+3 DO COMP
+4 DO SYSDEF
+5 DO SCRIPT1
+6 QUIT
COMP ;----- COMPILE PRINT TEMPLATES
+1 ;
+2 ; This subroutine recompiles all the compiled ARMS print
+3 ; templates
+4 ;
+5 NEW ACRIEN,ACRTEMP,DMAX,X,Y
+6 DO BMES^XPDUTL("Recompiling print templates...")
+7 SET ACRTEMP="ACR"
+8 FOR
SET ACRTEMP=$ORDER(^DIPT("B",ACRTEMP))
IF ACRTEMP']""
QUIT
IF $EXTRACT(ACRTEMP,1,3)'="ACR"
QUIT
Begin DoDot:1
+9 SET ACRIEN=0
+10 FOR
SET ACRIEN=$ORDER(^DIPT("B",ACRTEMP,ACRIEN))
IF 'ACRIEN
QUIT
Begin DoDot:2
+11 SET X=$PIECE($GET(^DIPT(ACRIEN,"ROU")),U,2)
+12 IF X']""
QUIT
+13 SET Y=ACRIEN
+14 SET DMAX=$$ROUSIZE^DILF
+15 DO EN^DIPZ
End DoDot:2
End DoDot:1
+16 QUIT
SYSDEF ;----- UPDATE SYSTEM DEFAULTS
+1 ;
+2 ; This update copies the Agency Location Code and
+3 ; Regional Finance Center code from the 1166 AFP SYSTEM
+4 ; PARAMETERS file to the FMS SYSTEM DEFAULTS file.
+5 ;
+6 NEW ACRALC,ACRECS,ACRRFC,ACRSYS,DA,DIE,DR,X,Y
+7 DO BMES^XPDUTL("Updating System Defaults...")
+8 SET ACRSYS=$ORDER(^AFSLPRM(0))
+9 IF 'ACRSYS
Begin DoDot:1
+10 DO BMES^XPDUTL("Can't locate AGENCY LOCATION CODE or REGIONAL")
+11 DO BMES^XPDUTL("FINANCE CENTER, please notify developer.")
End DoDot:1
QUIT
+12 SET ACRALC=$PIECE($GET(^AFSLPRM(ACRSYS,2)),U,2)
+13 SET ACRRFC=$PIECE($GET(^AFSLPRM(ACRSYS,2)),U,3)
+14 SET ACRECS="/usr/spool/afsdata/"
+15 SET DA=0
+16 FOR
SET DA=$ORDER(^ACRSYS(DA))
IF 'DA
QUIT
Begin DoDot:1
+17 SET DIE="^ACRSYS("
+18 SET DR="402.1///^S X=ACRALC;402.2///^S X=ACRRFC;402.3///^S X=ACRECS"
+19 DO ^DIE
End DoDot:1
+20 QUIT
SCRIPT1 ;----- INSTALL odocget UNIX SCRIPT
+1 ;
+2 ; Copies UNIX script contained in file acr_0210.s1 to
+3 ; /usr/spool/afsdata/odocget
+4 ;
+5 NEW ACRDIR,ACRPATH,X,Y
+6 DO BMES^XPDUTL("Installing odocget UNIX script")
+7 SET X=$$TERMINAL^%HOSTCMD("pwd > acrdir")
+8 DO OPEN^%ZISH("FILE","","acrdir","R")
+9 IF POP
Begin DoDot:1
+10 DO BMES^XPDUTL("Unable to install 'odocget' UNIX script")
+11 DO BMES^XPDUTL("Please notify developer")
End DoDot:1
QUIT
+12 USE IO
+13 READ X:DTIME
+14 SET ACRDIR=X
+15 DO CLOSE^%ZISH("FILE")
+16 SET X=$$TERMINAL^%HOSTCMD("rm acrdir")
+17 ;
+18 SET X=$$TERMINAL^%HOSTCMD("find / acr_0210.s1 > acr1 2>&1")
+19 SET X=$$TERMINAL^%HOSTCMD("cat acr1 | grep acr_0210.s1 > acr2")
+20 DO OPEN^%ZISH("FILE","","acr2","R")
+21 IF POP
Begin DoDot:1
+22 DO BMES^XPDUTL("Unable to install 'odocget' UNIX script")
+23 DO BMES^XPDUTL("Please notify developer")
End DoDot:1
QUIT
+24 USE IO
+25 READ X:DTIME
+26 SET ACRPATH=X
+27 SET ACRPATH=$PIECE(X,"/",1,$LENGTH(X,"/")-1)
+28 DO CLOSE^%ZISH("FILE")
+29 SET X=$$TERMINAL^%HOSTCMD("rm acr1")
+30 SET X=$$TERMINAL^%HOSTCMD("rm acr2")
+31 ;
+32 SET X=$$TERMINAL^%HOSTCMD("cp "_ACRPATH_"/acr_0210.s1"_" /usr/spool/afsdata/odocget")
+33 SET X=$$TERMINAL^%HOSTCMD("chmod a+x /usr/spool/afsdata/odocget")
+34 QUIT