ACGSREST ;IHS/OIRM/DSD/THL,AEF - RESTORES DATA GLOBALS FROM AREA SAVES TO CREATE HQ DATABASE; [ 03/27/2000 2:22 PM ]
;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
;;RESTORES DATA GLOBALS FROM AREA SAVES TO CREATE HQ DATABASE
EN D ^XBKVAR
D EN1
EXIT K %DEV,%TAP,%IN,%DFLT,%SEL,%ANS,%FN,%TIME,%CMT
Q
EN1 F ACG=102,161,235,239,241:1:249,285 S %FN="/usr3/cis/acg"_ACG_".asc" D RESTORE
D REINDEX
D WAIT^DICD,EN^ACGSTEMP
Q
RESTORE F ACGI=1:1:4 S (IOP,ION)="HOST FILE SERVER #"_ACGI,%IS("IOPAR")="("""_%FN_""":""R"")" D ^%ZIS Q:'POP
Q:POP
S %TAP=0,%IN=1,%DFLT="HFS",%SEL=0,%ANS="Y",%DEV=IO
U IO R %TIME:999,%CMT:999
I %TIME="" D DONE Q
START D START^ACGSGR
DONE D ^%ZISC
Q
REINDEX ;EP;TO REINDEX SELECTED FIELDS AFTER IMPORT
F X="B","C","E","F","G","K","L","M","N","O","P","Q","R","S","T","V","W","X","Y","D" K ^ACGS(X)
F ACGI=1:1 S DIK(1)=$T(@ACGI) Q:DIK(1)="" S DIK(1)=$P(DIK(1),";;",2) Q:DIK(1)="" D
.S DIK="^ACGS("
.D ENALL^DIK
.K DIK,DA
Q
1 ;;2^B
2 ;;.03^C
3 ;;30^E
4 ;;16^F
5 ;;15^G
6 ;;19^K
7 ;;121^L
8 ;;11^M
9 ;;4^N
10 ;;5^O
11 ;;10^P
12 ;;23^R
13 ;;1^S
14 ;;24^T
15 ;;25^V
16 ;;27^W
17 ;;154^X
18 ;;155^Y
19 ;;103^D
20 ;;1099^Q
ACGSREST ;IHS/OIRM/DSD/THL,AEF - RESTORES DATA GLOBALS FROM AREA SAVES TO CREATE HQ DATABASE; [ 03/27/2000 2:22 PM ]
+1 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
+2 ;;RESTORES DATA GLOBALS FROM AREA SAVES TO CREATE HQ DATABASE
EN DO ^XBKVAR
+1 DO EN1
EXIT KILL %DEV,%TAP,%IN,%DFLT,%SEL,%ANS,%FN,%TIME,%CMT
+1 QUIT
EN1 FOR ACG=102,161,235,239,241:1:249,285
SET %FN="/usr3/cis/acg"_ACG_".asc"
DO RESTORE
+1 DO REINDEX
+2 DO WAIT^DICD
DO EN^ACGSTEMP
+3 QUIT
RESTORE FOR ACGI=1:1:4
SET (IOP,ION)="HOST FILE SERVER #"_ACGI
SET %IS("IOPAR")="("""_%FN_""":""R"")"
DO ^%ZIS
IF 'POP
QUIT
+1 IF POP
QUIT
+2 SET %TAP=0
SET %IN=1
SET %DFLT="HFS"
SET %SEL=0
SET %ANS="Y"
SET %DEV=IO
+3 USE IO
READ %TIME:999,%CMT:999
+4 IF %TIME=""
DO DONE
QUIT
START DO START^ACGSGR
DONE DO ^%ZISC
+1 QUIT
REINDEX ;EP;TO REINDEX SELECTED FIELDS AFTER IMPORT
+1 FOR X="B","C","E","F","G","K","L","M","N","O","P","Q","R","S","T","V","W","X","Y","D"
KILL ^ACGS(X)
+2 FOR ACGI=1:1
SET DIK(1)=$TEXT(@ACGI)
IF DIK(1)=""
QUIT
SET DIK(1)=$PIECE(DIK(1),";;",2)
IF DIK(1)=""
QUIT
Begin DoDot:1
+3 SET DIK="^ACGS("
+4 DO ENALL^DIK
+5 KILL DIK,DA
End DoDot:1
+6 QUIT
1 ;;2^B
2 ;;.03^C
3 ;;30^E
4 ;;16^F
5 ;;15^G
6 ;;19^K
7 ;;121^L
8 ;;11^M
9 ;;4^N
10 ;;5^O
11 ;;10^P
12 ;;23^R
13 ;;1^S
14 ;;24^T
15 ;;25^V
16 ;;27^W
17 ;;154^X
18 ;;155^Y
19 ;;103^D
20 ;;1099^Q