Previous Topic: Examples of OPSJESX Function

Next Topic: OPSLOG Function

OPSLIKE Function

The OPSLIKE function lets you use wildcard characters to simplify coding text strings in OPS/REXX or AOF rules.

This function has the following format:

var = OPSLIKE(wildcard string, target string, [wildcard character string])
wildcard string

Contains the wild card characters.

target string

Contains the resulting string that is being tested.

wildcard characters string

Contains an optional argument to specify the character designated to match any number of characters (default='*') followed by one or more characters that are designated to match any single character value (default='?').

Default: '*?'

The possible condition codes returned by the OPSLIKE function follow:

1

True, a match is found.

0

False, a match is not found.

Note: When the target string is matched and the remaining pattern string contains only wild card characters and blanks, then a match condition, or 1, is returned.

Examples: OPSLIKE Statement

Note: The following two syntax error messages in the function call statement will cause an OPS/REXX error and terminate the program: