source: IHS-VA_UTILITIES-XB/trunk/ZIBRPI1.m@ 1745

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

Modified directory structure; moved routines.

File size: 3.3 KB
Line 
1ZIBRPI1 ; IHS/ADC/GTH - REMOTE PATCH INSTALLATION (1) ; [ 02/07/97 3:02 PM ]
2 ;;4.0;XB;;Jul 20, 2009;Build 2
3 ;
4 W !!,"EXECUTION UNAUTHORIZED.",!
5 Q
6 ;
7OPT ;EP - Set option in OPTION file.
8 I $P(^%ZOSF("OS"),"^")'["MSM" W !!,"SORRY. MSM only.",! Q
9 I $S('$D(DUZ(0)):1,DUZ(0)'="@":1,1:0) W !,"PROGRAMMER ACCESS REQUIRED",! Q
10 D HOME^%ZIS,DT^DICRW,00:'$L($P(^AUTTSITE(1,0),U,14))
11 NEW ZIB,ZIBAREA,D,DA,DIC,DIE,DR,I,O,POP,W
12 D HFS
13 I POP W !,"HFS not available." Q
14 D OS,HELP^ZIBRPI2("GEN")
15 S Y=1,%="Enter a number to choose the systems to which you want this report sent"
16 I $L($P(^AUTTSITE(1,0),U,14)) S DIR(0)="N^1:3:0",DIR("A")="Send reports to (1) "_$P($T(SYTM),";;",2)_" (2) "_$P(^(0),U,14)_" or (3) both",DIR("B")=2,DIR("?")=%,DIR("??")="^D HELP^ZIBRPI2(""SYSID"")" D DIR I $D(DIRUT) D ZISC Q
17 KILL DIR
18 S ZIBAREA="20///I "_Y
19 S DIR(0)="F^1:245",DIR("A")="From what "_$P(O,U)_" directory do you want to restore patches",DIR("?")="Enter the full path name of a directory",DIR("??")="^D HELP^ZIBRPI2(""DIRECT"")"
20 S:D("IN")]"" DIR("B")=D("IN")
21 ; The following line is non-standard M because of the Q:$L(X)
22 F D DIR Q:$D(DIRUT) D HC(O("LS")_Y_"* > "_W) S IOP=I,%ZIS("IOPAR")="("""_W_""":""R"")" D ZIS U IO R X:300 U IO(0) Q:$L(X) W " Directory does not exist (or empty).",*7
23 S D=Y
24 D ZISC
25 Q:$D(DIRUT)
26 S ZIBAREA=ZIBAREA_" S:0 %="""_D
27 S (DIR(0),DIR("B"))="Y",DIR("A")="If action routine '(A/B)9<pkg><patch#>' exists, do you want it ran",DIR("??")="^D HELP^ZIBRPI2(""ACTION"")"
28 D DIR
29 Q:$D(DIRUT)
30 S ZIBAREA=ZIBAREA_U_Y_""""
31 S DIC="^DIC(19,",DIC(0)="",X="ZIB REMOTE PATCH INSTALLATION",DIC("DR")="1///Remote Patch Installation;4///R;"_ZIBAREA_";25///START^ZIBRPI;200///T@2315;202///1D"
32 F ZIB="ZIB REMOTE PATCH INSTALLATION","AZHL REMOTE PATCH INSTALLATION" I $D(^DIC(19,"B",ZIB)) S DIE=DIC,DA=$O(^DIC(19,"B",ZIB,0)),DR=".01///"_X_";"_ZIBAREA_";25///START^ZIBRPI" D DIE I 1 Q
33 E D FILE
34 W !!,"Done."
35 Q
36 ;
37DIE NEW D,E,F,I,J,L,N,O,P,V,W D ^DIE Q
38DIR NEW D,E,F,I,J,L,N,O,P,V,W D ^DIR Q
39FILE NEW D,E,F,I,J,L,N,O,P,V,W KILL DD,DO D FILE^DICN Q
40HC(%) NEW D,E,F,I,J,L,N,O,P,V,W S %=$$JOBWAIT^%HOSTCMD(%) Q
41XMD NEW D,E,F,I,J,L,N,O,P,V,W D ^XMD Q
42ZIS NEW D,E,F,I,J,L,N,O,P,V,W D ^%ZIS Q
43ZISC NEW D,E,F,I,J,L,N,O,P,V,W D ^%ZISC Q
44 ;
45HFS ;
46 F I=0:0 S I=$O(^%ZIS(1,I)) Q:'I I ^(I,"TYPE")="HFS" S IOP=$P(^%ZIS(1,I,0),U),%ZIS("IOPAR")="(""/usr/spool/uucppublic/work.zib"":""W"")" D ZIS Q:'POP
47 I 'I,'$D(POP) S POP=1
48 Q:POP
49 S I=$P(^%ZIS(1,I,0),U)
50 Q
51 ;
52OS ;
53 S O=$P($P(^%ZOSF("OS"),","),"-",2)
54 S O("PF")=$P($T(PATTERN^ZIBRPI),";",3)
55 S W=$P($T(WORK^ZIBRPI),";",3)
56 I O["UNIX" S (D("IN"),D("OUT"))=$P($T(PUB^ZIBRPI),";",3),O("RM")="rm ",O("LS")="ls -l ",W=D("OUT")_W Q
57 S %=$G(^AUTTSITE(1,1)),D("IN")=$P(%,U),D("OUT")=$P(%,U,2),O("RM")="DEL ",O("LS")="DIR /B "
58 Q
59 ;
60SYTM ;;dpssyg
6110 ;;abr-ab
6211 ;;bji-ao
6320 ;;albisc
6430 ;;akarea
6540 ;;bilcsy
6650 ;;okc-ao
6751 ;;nsa-oa
6861 ;;cao-as
6960 ;;phx-ao
7070 ;;pordps
7180 ;;nav-aa
7200 ;;tucdev
73 NEW DIE,DR,DA
74 S DA=$P($T(@($P(^AUTTAREA($P(^AUTTLOC($P(^AUTTSITE(1,0),U),0),U,4),0),U,2))),";;",2),DR="W $J("""",IOM-$L(X)\2)_X,!!"
75 W !!
76 F X="A system id for your area computer does not exist in the RPMS SITE file.","Based on your area code, it should probably be '"_DA_"'.","Please enter an area system id into the RPMS SITE file, now.","(Calling DIE for you)." X DR
77 S DIE="^AUTTSITE(",DR=".14//"_DA,DA=1
78 D DIE
79 Q
Note: See TracBrowser for help on using the repository browser.