Supporting File Structures|Equivalents Files
An Equivalents File is simply a file containing a list of records containing two or more values, separated by commas.
The data values in a single record are deemed to be or mean the same as one another, with the first (leftmost) entry being
considered to be the main, normal or common expression of that data value.
Equivalents Files are used primarily for checking for similar or duplicate data values and records.
A typical Equivalents File would look like this (abbreviated) :-
MALE,M,MAN,MLE,MR,BOY
FEMALE,F,FEM,FML,FEML,FMALE,FMAL,LADY,GIRL,DAME,WOMAN,MISS,MRS,MS
UNKNOWN,UK,U/K,NOT KNOWN,N/K,NK
Equivalents files are used principally by the conversion functions :-
- EQUIVALENTS_FILE(F)
- EQUIVALENTS_FILE_WE(F)
- EQUIVALENTS_FILE_PSE(F)
- EQUIVALENTS_FILE_WSE(F)
Depending upon which function is being used the conversion behaviour is as follows :-
EQUIVALENTS_FILE(F) and EQUIVALENTS_FILE_WE(F)
Both functions are identical. Both examine each distinct word in the source value, and if this word exists in any
word equivalents file record, regardless of case, then this word is converted to the first word in the record in
the word equivalents file.
For example, in the word equivalents file there might be a record as follows :-
STEPHEN,STEVEN,STEVE
If so, then the source value 'STEVE HARDING' will be converted to 'STEPHEN HARDING'.
EQUIVALENTS_FILE_WSE(F)
This function examines the whole source value, and if this value exists in any
whole string equivalents file record, regardless of case, then this value is converted to the first value in the record in
the whole string equivalents file.
For example, in the whole string equivalents file there might be a record as follows :-
STEPHEN HARDING,STEVE HARDING,STEVEN HARDING
If so, then the source value 'STEVE HARDING' will be converted to 'STEPHEN HARDING'.
EQUIVALENTS_FILE_PSE(F)
This function examines the whole source value, and if any substring of this value exists in any
partial string equivalents file record, regardless of case, then this substring is converted to the first value
in the record in the partial string equivalents file.
For example, in the partial string equivalents file there might be a record as follows :-
ONE_TWO_THREE,ONE,FOUR
If so, then the source value 'ONE TIME' will be converted to 'ONE_TWO_THREE TIME'.