Determines whether a data stream contains a given string.
&MAIFIND [ CHAR | HEX ] string
Determines whether the data stream currently being processed (from either the application or the terminal) contains the specified string of data.
Operands:
Specifies that the string is provided in character format.
Specifies that the string is provided in character-format hexadecimal. The string must only contain valid hexadecimal characters (0 to 9, A to Z), and must contain an even number of characters.
The string for which to search. The string starts at the first non-blank character after any operand, and ends at the last non-blank character on the statement. A variable or variables is specified as the string. For hexadecimal specification, embedded blanks in the string are eliminated.
Examples: &MAIFIND
&MAIFIND ENTER LOGON &MAIFIND CHAR ENTER PASSWORD &MAIFIND HEX D9C5C1C4E8401D
Return Codes:
On completion the &RETCODE system variable is set as follows:
The string is found
The data stream does not contain the specified string
Notes:
An &MAIFIND issued when there is no data outstanding is ignored. Data is outstanding from the time an &MAIREAD is satisfied until an &MAICONT, &MAIDEL, or another &MAIREAD is issued.
The data stream searched for the string is the one last received by an &MAIREAD.
The data stream search is not case sensitive. The string and the data stream are always converted to uppercase before the search is performed.
| Copyright © 2009 CA. All rights reserved. |
|