Previous Topic: Examples of OPSJESX FunctionNext Topic: OPSLOG Function


OPSLIKE Function

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

OPSLIKE has the following format:

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

Contains the wildcard characters.

target string

Contains the resulting string that is being tested.

wildcard characters string

Contains an optional argument that specifies the character that is 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 OPSLIKE function returns the following possible condition codes:

1

Indicates that a match is found.

0

Indicates that 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 two following syntax error messages in the function call statement cause an OPS/REXX error and terminate the program: