SUBSTRNG Routine - trillium_discovery - trillium_quality - 17.2

Trillium Control Center

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Discovery
Trillium > Trillium Quality
Version
17.2
Language
English
Product name
Trillium Quality and Discovery
Title
Trillium Control Center
First publish date
2008
Last updated
2024-07-01
Published on
2024-07-01T08:56:48.630530

The SUBSTRNG routine detects the presence of one string of characters (field 1) within another string of characters (field 2), excluding blank strings. This routine requires two fields defined from each record: field 1 is the first field, field 2 is the second field. It performs two comparisons:

  1. Compares field 1 from record 1 with field 2 from record 2 and detects whether field 1 is a substring of field 2.
  2. Compares field 1 from record 2 with field 2 from record 1 and detects whether field 1 is a substring of field 2.

This routine returns the highest of the two comparison scores.

Note: The SUBSTRNG routine performs the comparison in one direction only; the routine looks for field 1 in field 2 and not vice versa. It does not look for field 2 in field 1.
Table 1. Scoring for SUBSTRNG

Score

Description

100

First string is exactly the second string.

99

First string resides at the beginning of the second string.

98

First string resides at the end of the second string.

97

First string resides within the second string.

0

Any other value.

Example

Record Field 1 Field 2

1

J

John Paul
2

Paul

John

 

 

Field 1/Rec 1

vs Field 2/Rec 2 Score
Comparison 1

J

  John 99
  Field 1/Rec 2 vs Field 2/Rec 1  
Comparison 2

Paul

  John Paul 98
Score returned       99