|
LOOKUP FUNCTION
lookup_next()
§ Lookup_next will give you the next available match in the Lookup file. § Lookup_next should be Preceded after successful call to lookup, lookup_count, lookup_match, lookup_nth, lookup_range, or lookup_next itself. § The lookup_next function returns NULL if you call it more times than the number of matching records in the file, or if the next matching record does not exist. § Behavior of lookup_next() on different calls
The next successive matching record after the previous call to lookup
or lookup_range.
The first matching record after the previous call to lookup_count
or lookup_match.
The (n+1)st successive matching record after the previous call to lookup_nth.
The next successive matching record after the previous call to lookup_next
itself.
SYNTAX AND EXAMPLE
|
lookup_next(lookup_file)
Preceding lookup_next with lookup_count can be useful when you need to know
how many records
will
be returned.
Once
you have the count of records, you call lookup_next inside a loop to retrieve
them all.
let integer(4) i = 0;
let integer(4) n = lookup_count("MyLookup", in.key);
let my_type[integer(4)] result_vector = for (i, i < n) :
lookup_next("MyLookup");
The first call to lookup_next, following the
call to lookup_count, returns the first matching record from
MyLookup.
Subsequent
loop iterations return the balance of the n matching records and store them
in
result_vector.
|
STRING FUNCTION String _split : Splits the given string by the specified delimiter. Output of this function will be a vector value. String_split_no_empty: This function behaves as same as string_split function. But only difference is, this function will remove empty strings from the result set. String_index: The function returns the index of the first character in the first occurrence of the string. a. Index numbering of the string starts with 1. b. If the string length is zero, then the functions returns 1. c. If the string is not pres...