Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ENXLFIX0

ENXLFIX0.m

Go to the documentation of this file.
  1. ENXLFIX0 ;WISC/SAB-FIX POINTERS TO ENG SPACE FILE (continued) ;1-6-94
  1. ;;7.0;ENGINEERING;**1**;Aug 17, 1993
  1. SPACES ; handle locations with leading spaces here (convert mode only)
  1. ;
  1. ; if location only has spaces then delete it from all records
  1. ; otherwise remove the leading spaces from the location.
  1. ; The modified location will be processed later during the
  1. ; main $Order thru the location x-ref.
  1. ;
  1. ; lets get the location without leading spaces
  1. S ENLOCN=ENLOC,ENDA=""
  1. F Q:$E(ENLOCN,1)'=" " S ENLOCN=$E(ENLOCN,2,$L(ENLOCN))
  1. ; if nothing left then delete the location
  1. I ENLOCN']"" F S ENDA=$O(@(ENXRF_"ENLOC,ENDA)")) Q:'ENDA D
  1. .S DIE=$S(ENFL="EQ":"^ENG(6914,",1:"^ENG(6920,"),DA=ENDA
  1. .S DR=$S(ENFL="EQ":"24",1:"3")_"///@" D ^DIE
  1. ; if something left then change current location
  1. I ENLOCN]"" F S ENDA=$O(@(ENXRF_"ENLOC,ENDA)")) Q:'ENDA D
  1. .S $P(@ENODE,U,ENPIECE)=ENLOCN ; update location
  1. .K @(ENXRF_"ENLOC,ENDA)") ; kill old x-ref
  1. .S @(ENXRF_"ENLOCN,ENDA)")="" ; set new x-ref
  1. K ENLOCN
  1. Q
  1. RFTR ; report footer
  1. W !,"# of different free-text locations = ",ENT("LOC")," (# convertible = ",ENT("LOC_CVT"),")",!
  1. W "# of records with free-text locations = ",ENT("REC")," (# convertible = ",ENT("REC_CVT"),")",!!
  1. I ENT("REC") D
  1. .W "Free-Text values were found in the LOCATION field of",!
  1. .W ENFLNM," records. These free-text values",!
  1. .I ENCVTM D
  1. ..W "were either converted to pointers or identified",!
  1. ..W "by a leading '*'. The leading astrisk ensures",!
  1. ..W "that these values will not be inappropriately",!
  1. ..W "evaluated as a pointer.",!
  1. .E D
  1. ..W "should be converted to pointer values. If an exact match",!
  1. ..W "exists in the ENG SPACE file ROOM NUMBER or SYNONYM fields",!
  1. ..W "then option 'Convert Free-Text Locations' can be used to",!
  1. ..W "perform the conversion. A leading '*' will be removed from",!
  1. ..W "the free-text location before checking for a match.",!
  1. I ENT("REC_CVT") D
  1. .W !,"Convertable free-text entries were found in the ",!
  1. .I ENCVTM D
  1. ..W ENFLNM,". They have been converted to pointers.",!
  1. .E D
  1. ..W ENFLNM,". You must use the 'Convert Free-Text Locations'",!
  1. ..W "option for the ",ENFLNM," to actually convert",!
  1. ..W "these values to pointers.",!
  1. I 'ENT("REC") D
  1. .W "The ",ENFLNM," LOCATION field does not contain any",!
  1. .W "Free-Text values. No further action is required on this file.",!
  1. Q