The find() built-in functions return the position of the pattern in the searched data beginning at the starting position for an optional length.
The FIND() and SCAN() built-in functions are synonyms--either may be used. The suffix FINDi and SCANi
indicate that the scan should be case insensitive.
The SCAN/SCANi built-in functions scans parameter 2 for the pattern specified on parameter 1. The SCAN() is case-sensitive, whereas SCANI() is case-insensitive.
- The pattern to be searched for.
- The Session Variable that is searched.
- The starting position within the Session Variable (2nd parameter) to begin the scan.
- The number of bytes from the start position to scan.
-- Find IBM in the company name if (scani('ibm',&company) > 0); -- Do special processing for IBM else; -- Handle other situations endif;