1 | FSCCLEAN ;SLC/STAFF-NOIS Clean Old NOIS Files and Data ;1/19/98 13:54
|
---|
2 | ;;1.1;NOIS;;Sep 06, 1998
|
---|
3 | ;
|
---|
4 | ENV ; from environment check on install
|
---|
5 | N FILE,XPDQUIT
|
---|
6 | W !,"Environment Check",!
|
---|
7 | I $L($O(^FSC(0))),'$L($O(^FSCD(0))) D BAD Q
|
---|
8 | F FILE="7102.5","7105.2","ACAT","ACT","CCAT","FYQT","LOG","OCAT","PERF","PRIO","PRIOR","ROL","SIMP","SPCAREA","SUP","TIC","TITLE","TK","VAL" I $D(^FSC(FILE)) D BAD Q
|
---|
9 | Q
|
---|
10 | ;
|
---|
11 | BAD ; stops install
|
---|
12 | S XPDQUIT=2 ; don't install but leave in XTMP
|
---|
13 | W $C(7),$C(7),!,"Please check that any old versions (<1.0T1) of NOIS have been removed before"
|
---|
14 | W !,"installing this version."
|
---|
15 | W !!,"If you are installing NOIS but have an old version you should:"
|
---|
16 | W !,"Delete all FSC* routines"
|
---|
17 | W !,"Delete all FSC* options"
|
---|
18 | W !,"Delete all FSC* help frames"
|
---|
19 | W !,"Delete all NOIS files (D CLEAN^FSCCLEAN)"
|
---|
20 | W !,"Reinstall this build"
|
---|
21 | Q
|
---|
22 | ;
|
---|
23 | CLEAN ; setup use only
|
---|
24 | N DIR,DIU,FSCFILE,Y K DIR,DIU
|
---|
25 | D
|
---|
26 | .W !!,"This routine will DELETE all NOIS files, templates and data from this UCI."
|
---|
27 | .S DIR(0)="Y",DIR("A")="Is this what you want to do",DIR("B")="N"
|
---|
28 | .D ^DIR Q:Y'=1
|
---|
29 | .W $C(7) S DIR(0)="Y",DIR("A")="Are you absoultely SURE",DIR("B")="N"
|
---|
30 | .D ^DIR Q:Y'=1
|
---|
31 | .S FSCFILE=7100,DIU=7100,DIU(0)="DET" D EN^DIU2
|
---|
32 | .F S FSCFILE=$O(^DIC(FSCFILE)) Q:FSCFILE>7109 D
|
---|
33 | ..N DIU
|
---|
34 | ..S DIU=FSCFILE,DIU(0)="DET" D EN^DIU2
|
---|
35 | K DIR,DIU
|
---|
36 | Q
|
---|
37 | ;
|
---|
38 | FRESH ; setup use only
|
---|
39 | N DIR,Y K DIR
|
---|
40 | D
|
---|
41 | .W !!,"This routine will REMOVE ALL NOIS DATA."
|
---|
42 | .S DIR(0)="Y",DIR("A")="Is this what you want to do",DIR("B")="N"
|
---|
43 | .D ^DIR Q:Y'=1
|
---|
44 | .W $C(7) S DIR(0)="Y",DIR("A")="Are you absoultely SURE",DIR("B")="N"
|
---|
45 | .D ^DIR Q:Y'=1
|
---|
46 | .K ^FSCD("ALERT"),^("CALL"),^("COUNT"),^("EVENTS"),^("LISTS"),^("MRA"),^("MRE"),^("MRU"),^("NOTIFY"),^("RESPONSE"),^("SCHEDULE"),^("SEND"),^("STATUS HIST"),^("STU ALERT"),^("STU MSG"),^("TEXT"),^("WKLD")
|
---|
47 | .S ^FSCD("ALERT",0)="NOIS ALERT^7100.3P"
|
---|
48 | .S ^FSCD("CALL",0)="NOIS CALL^7100I"
|
---|
49 | .S ^FSCD("COUNT",0)="NOIS COUNTER^7100.1D"
|
---|
50 | .S ^FSCD("EVENTS",0)="NOIS EVENTS^7103DI"
|
---|
51 | .S ^FSCD("LISTS",0)="NOIS LIST^7102P"
|
---|
52 | .S ^FSCD("MRA",0)="NOIS MRA^7101.2P"
|
---|
53 | .S ^FSCD("MRE",0)="NOIS MRE^7101.1P"
|
---|
54 | .S ^FSCD("MRU",0)="NOIS MRU^7101.3P"
|
---|
55 | .S ^FSCD("NOTIFY",0)="NOIS NOTIFICATION^7100.2PI"
|
---|
56 | .S ^FSCD("RESPONSE",0)="NOIS RESPONSE^7101.4"
|
---|
57 | .S ^FSCD("SCHEDULE",0)="NOIS SCHEDULE^7103.1DI"
|
---|
58 | .S ^FSCD("SEND",0)="NOIS SEND^7100.4P"
|
---|
59 | .S ^FSCD("STATUS HIST",0)="NOIS STATUS HISTORY^7100.5PI"
|
---|
60 | .S ^FSCD("STU ALERT",0)="NOIS STU ALERT^7104.3P"
|
---|
61 | .S ^FSCD("STU MSG",0)="NOIS STU MESSAGE^7104DI"
|
---|
62 | .S ^FSCD("TEXT",0)="NOIS TEXT^7101"
|
---|
63 | .S ^FSCD("WKLD",0)="NOIS WORKLOAD^7103.5PI"
|
---|
64 | .D TMP,XTMP
|
---|
65 | K DIR
|
---|
66 | Q
|
---|
67 | ;
|
---|
68 | XTMP ; clean XTMP nodes
|
---|
69 | N NODE
|
---|
70 | S NODE="FSC" F S NODE=$O(^XTMP(NODE)) Q:NODE="" Q:NODE]"FSCZ" K ^XTMP(NODE)
|
---|
71 | Q
|
---|
72 | ;
|
---|
73 | TMP ; clean TMP nodes
|
---|
74 | N NODE
|
---|
75 | S NODE="FSC" F S NODE=$O(^TMP(NODE)) Q:NODE="" Q:NODE]"FSCZ" K ^TMP(NODE)
|
---|
76 | Q
|
---|