source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENXLFIX0.m@ 1501

Last change on this file since 1501 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1ENXLFIX0 ;WISC/SAB-FIX POINTERS TO ENG SPACE FILE (continued) ;1-6-94
2 ;;7.0;ENGINEERING;**1**;Aug 17, 1993
3SPACES ; handle locations with leading spaces here (convert mode only)
4 ;
5 ; if location only has spaces then delete it from all records
6 ; otherwise remove the leading spaces from the location.
7 ; The modified location will be processed later during the
8 ; main $Order thru the location x-ref.
9 ;
10 ; lets get the location without leading spaces
11 S ENLOCN=ENLOC,ENDA=""
12 F Q:$E(ENLOCN,1)'=" " S ENLOCN=$E(ENLOCN,2,$L(ENLOCN))
13 ; if nothing left then delete the location
14 I ENLOCN']"" F S ENDA=$O(@(ENXRF_"ENLOC,ENDA)")) Q:'ENDA D
15 .S DIE=$S(ENFL="EQ":"^ENG(6914,",1:"^ENG(6920,"),DA=ENDA
16 .S DR=$S(ENFL="EQ":"24",1:"3")_"///@" D ^DIE
17 ; if something left then change current location
18 I ENLOCN]"" F S ENDA=$O(@(ENXRF_"ENLOC,ENDA)")) Q:'ENDA D
19 .S $P(@ENODE,U,ENPIECE)=ENLOCN ; update location
20 .K @(ENXRF_"ENLOC,ENDA)") ; kill old x-ref
21 .S @(ENXRF_"ENLOCN,ENDA)")="" ; set new x-ref
22 K ENLOCN
23 Q
24RFTR ; report footer
25 W !,"# of different free-text locations = ",ENT("LOC")," (# convertible = ",ENT("LOC_CVT"),")",!
26 W "# of records with free-text locations = ",ENT("REC")," (# convertible = ",ENT("REC_CVT"),")",!!
27 I ENT("REC") D
28 .W "Free-Text values were found in the LOCATION field of",!
29 .W ENFLNM," records. These free-text values",!
30 .I ENCVTM D
31 ..W "were either converted to pointers or identified",!
32 ..W "by a leading '*'. The leading astrisk ensures",!
33 ..W "that these values will not be inappropriately",!
34 ..W "evaluated as a pointer.",!
35 .E D
36 ..W "should be converted to pointer values. If an exact match",!
37 ..W "exists in the ENG SPACE file ROOM NUMBER or SYNONYM fields",!
38 ..W "then option 'Convert Free-Text Locations' can be used to",!
39 ..W "perform the conversion. A leading '*' will be removed from",!
40 ..W "the free-text location before checking for a match.",!
41 I ENT("REC_CVT") D
42 .W !,"Convertable free-text entries were found in the ",!
43 .I ENCVTM D
44 ..W ENFLNM,". They have been converted to pointers.",!
45 .E D
46 ..W ENFLNM,". You must use the 'Convert Free-Text Locations'",!
47 ..W "option for the ",ENFLNM," to actually convert",!
48 ..W "these values to pointers.",!
49 I 'ENT("REC") D
50 .W "The ",ENFLNM," LOCATION field does not contain any",!
51 .W "Free-Text values. No further action is required on this file.",!
52 Q
Note: See TracBrowser for help on using the repository browser.