Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

MEMSEARCH

Example

MEMSEARCH returns an unscaled REAL FIXED BINARY value specifying the first position (from the left) in a buffer at which any character, graphic or widechar in a given string appears.

Read syntax diagramSkip visual syntax diagram>>-MEMSEACRH--(--p--,--n--,--x--)------------------------------><
 
p
Address of buffer to be searched.
n
Length of buffer to be searched.
x
String-expression.

The buffer length must have a computational type and will be converted to FIXED BINARY(31,0).

The buffer length must be nonnegative.

The string-expression x must have type CHARACTER (including PICTURE), GRAPHIC or WIDECHAR. The buffer length is interpreted as the number of units of that string type.

The address p and the length n specify the "string" in which to search for any character, graphic or widechar that appears in x.

If either the buffer length n is zero or x is the null string, the result is zero.

If x does not occur in the buffer, the result is zero.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)