source: IHS-VA_UTILITIES-XB/trunk/ZIBPKGP.m@ 1511

Last change on this file since 1511 was 642, checked in by Sam Habiel, 15 years ago

Modified directory structure; moved routines.

File size: 4.0 KB
Line 
1ZIBPKGP ; IHS/ADC/GTH - PROCESS IMPLEMENTATION STATUS FILES ; [ 02/07/97 3:02 PM ]
2 ;;4.0;XB;;Jul 20, 2009;Build 2
3 ;
4 Q
5 ;
6OPT ; Set option in OPTION file.
7 I $P(^%ZOSF("OS"),"^")'="MSM-UNIX" W !!,"SORRY. MSM-UNIX only.",! Q
8 I $S('$D(DUZ(0)):1,DUZ(0)'="@":1,1:0) W !,"PROGRAMMER ACCESS REQUIRED",! Q
9 NEW DA,DIC,DIE,DR
10 D HOME^%ZIS,DT^DICRW
11 S X="ZIB IMPLEMENTATION STATUS",DR="W $J("""",IOM-$L(%)\2)_%,!!"
12 W !
13 F %="Option '"_X_"' will be placed","in the OPTION file for daily processing, beginning tomorrow morning","at 0530 AM. You can change the frequency/time of scheduling by","using the TaskMan option thru the Kernel." X DR
14 S DIC="^DIC(19,",DIC(0)="",DIC("DR")="1///ZIB Implementation Status;4///R;25///IN^ZIBPKGP;200///T+1@0530;202///1D"
15 I $D(^DIC(19,"B",$E(X,1,30))) S DIE=DIC,DA=$O(^DIC(19,"B",$E(X,1,30),0)),DR=DIC("DR") D DIE I 1
16 E KILL DD,DO D FILE
17 W !!,"Done.",!
18 Q
19 ;
20IN ;EP - From TaskMan.
21 ; A = Date of Installation
22 ; D = Directory
23 ; F = File
24 ; L = ASUFAC Code
25 ; P = Package Prefix
26 ; S = Short Description of Package
27 ; S(1) = 1st Subscript of ^DIZ(8009545 (Facility)
28 ; S(2) = 2nd Subscript of ^DIZ(8009545 (Package)
29 ; T = Patch
30 ; V = Version
31 ; Z = Line of Input
32 ; Read in status files from remote site and place in FM file.
33 ;
34 NEW A,D,F,L,P,S,T,V,XMB,XMTEXT,Z
35 S X=$$JOBWAIT^%HOSTCMD("ls -l /usr/spool/uucppublic/pkg* > zibpkg.wrk ; ls -l /usr/spool/uucppublic/rpi* >> zibpkg.wrk")
36 F A=0:0 S A=$O(^%ZIS(1,A)) Q:'A I ^(A,"TYPE")="HFS" S IOP=$P(^%ZIS(1,A,0),U),%ZIS("IOPAR")="(""zibpkg.wrk"":""R"")" D ZIS Q:'POP
37 Q:POP!('A)
38 KILL ^TMP($J)
39 U IO
40 F R %:300 Q:%="" S %=$P(%,"/",5) S:%?1"pkg"6N1"."3N ^TMP($J,"PKG",%)="" S:%?1"rpi"6N1"."3N ^TMP($J,"RPI",%)=""
41 S F="",D="/usr/spool/uucppublic/"
42MAIN ;
43PKG ;
44 F S F=$O(^TMP($J,"PKG",F)) Q:F="" U IO:(D_F) D
45 . F R Z:300 Q:(Z="")!(Z'?6N1"^"1U1.3UN1"^".E) D
46 .. S L=$P(Z,U),P=$P(Z,U,2),S=$P(Z,U,3),V=$P(Z,U,4),A=$P(Z,U,5)
47 .. S:S="" S="error"
48 .. D FAC
49 .. S DA=S(2),DIE="^DIZ(8009545,"_S(1)_",1,",DR="1////"_V_";2////P;3////"_A
50 .. D DIE
51 .. S ^TMP($J,"PKG",F)=L
52 ..Q
53 . S X=$$JOBWAIT^%HOSTCMD("rm "_D_F)
54 .Q
55 ;
56RPI ;
57 F S F=$O(^TMP($J,"RPI",F)) Q:F="" U IO:(D_F) D
58 . F R Z:300 Q:(Z="")!(Z'?6N1"^"2.4L1".v"1.2N1"."1.2N.1A.2N1"p"1.3N1"^".E) I $P(Z,U,3)="INSTALLED" D
59 .. S L=$P(Z,U),T=$P(Z,U,2),A=$P(Z,U,4),P=$P(T,"."),V=$P($P(T,".v",2),"p"),T=$P($P(T,".v",2),"p",2)
60 .. F XMB="P","V" S X=@XMB X ^DD("FUNC",$O(^DD("FUNC","B","UPPERCASE",0)),1) S @XMB=X
61 .. S S=P
62 .. D FAC
63 .. S DA(2)=S(1),DA(1)=S(2),DA=T
64 .. I '$D(^DIZ(8009545,DA(2),1,DA(1),1,0)) S ^(0)="^8009545.03^^"
65 .. I '$D(^DIZ(8009545,DA(2),1,DA(1),1,DA)) S (X,DINUM)=DA,DIC="^DIZ(8009545,"_DA(2)_",1,"_DA(1)_",1,",DIC(0)="",DIC("DR")="1///"_A_";2///"_$P(Z,U,2) D FILE KILL DINUM I 1
66 .. E S DIE="^DIZ(8009545,"_DA(2)_",1,"_DA(1)_",1,"_DA_",",DR="1///"_A_";2///"_$P(Z,U,2) D DIE
67 .. S ^TMP($J,"RPI",F)=L
68 ..Q
69 . S X=$$JOBWAIT^%HOSTCMD("rm "_D_F)
70 .Q
71 ;
72ENDMAIN ;
73 D ZISC
74 S X=$$JOBWAIT^%HOSTCMD("rm zibpkg.wrk")
75 ; ^TMP($J,"PKG",file)=facility
76 S F="",%=0
77 F S F=$O(^TMP($J,"PKG",F)) Q:F="" S %=%+1,XMTEXT(%)=" Application status received from "_^(F)
78 S F=""
79 F S F=$O(^TMP($J,"RPI",F)) Q:F="" I $L(^(F)) S %=%+1,XMTEXT(%)=" Patch application received from "_^(F)
80 I $L($O(^TMP($J,"PKG",""))) S XMB="ZIB PKG",XMTEXT="XMTEXT(" D XMB
81 KILL ^TMP($J)
82Q ;
83 Q
84 ;
85FAC ;
86 I '$D(^DIZ(8009545,"B",$O(^AUTTLOC("C",L,0)))) S X=$O(^AUTTLOC("C",L,0)),DIC="^DIZ(8009545,",DIC(0)="" D FILE S S(1)=+Y I 1
87 E S S(1)=$O(^DIZ(8009545,"B",$O(^AUTTLOC("C",L,0)),0))
88 I '$D(^DIZ(8009545,S(1),1,0)) S ^(0)="^8009545.02PA^^"
89 I '$D(^DIC(9.4,"C",P)) S X=S,DIC="^DIC(9.4,",DIC(0)="",DIC("DR")="1///"_P_";2///"_S D FILE S S(2)=+Y I 1
90 E S S(2)=$O(^DIC(9.4,"C",P,0))
91 I '$D(^DIZ(8009545,S(1),1,"B",S(2))) S X=S(2),DA(1)=S(1),DIC="^DIZ(8009545,"_S(1)_",1,",DIC(0)="" D FILE S S(2)=+Y I 1
92 E S S(2)=$O(^DIZ(8009545,S(1),1,"B",S(2),0))
93 Q
94 ;
95FILE NEW A,D,DD,DO,F,L,P,S,T,V,Z D FILE^DICN KILL DIC Q
96DIE NEW A,D,F,L,P,S,T,V,Z D ^DIE KILL DA,DR,DIE Q
97XMB NEW A,D,F,L,P,S,T,V,Z D ^XMB Q
98ZIS NEW A,D,F,L,P,S,T,V,Z D ^%ZIS Q
99ZISC NEW A,D,F,L,P,S,T,V,Z D ^%ZISC Q
Note: See TracBrowser for help on using the repository browser.