Data Transformation Engine Design Studio Tutorial
Chapter 7 - Using Cross-Referenced Data Optional Exercise
Design Studio Tutorial
168
Build and run the SortRegion_Descending map.
The run results are sorted in descending order.
Optional Exercise
Create a SortRegion_Ascending map and use the SORTUP function to generate
results in ascending order. Use the region_asc.txt file as the data source of the
input card.
Using the SEARCHUP Function
Use the SEARCHUP function when the cross-reference file is in ascending order.
Using the
SEARCHUP function rather than the LOOKUP function optimizes the
search.
The
SEARCHUP function performs a binary search on a series sorted in ascending
order, returning a related object that corresponds to the item found.
The syntax of the
SEARCHUP function is:
SEARCHUP (
object_to_get, ordered_series_to_search,
object_to_compare
)
The
SEARCHUP function has three arguments:
♦ The first argument is the object to get that is related to the ordered series,
which is in ascending order:
object_to_get
♦ The second argument is the ascending ordered series of objects:
ordered_series_to_search
♦ The third argument is the members of the series that are compared to the
second argument:
object_to_compare
Note For the SEARCHUP function to work properly, the second argument
ordered_series_to_search
must be in ascending order.