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])
Contains the wildcard characters.
Contains the resulting string that is being tested.
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:
Indicates that a match is found.
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
var=OPSLIKE('XOOOO','OPSLOGOOOOOOOOOOOOOO','*?')
var=OPSLIKE('XOOOO','OPSLOGOOOOOOOOOOOOOO')
var=OPSLIKE('XYZ?ABC*','XYZ$ABCDEFG')
var=OPSLIKE('*XYZ?ABC','123XYZ+ABC')
var=OPSLIKE('*XYZ','XYZ1234')
var=OPSLIKE('*XYZ*','XYZ1234')
Note: The two following syntax error messages in the function call statement cause an OPS/REXX error and terminate the program:
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|