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

INDEX

INDEX returns a FIXED value indicating the starting position within x of a substring identical to y. You can also specify the location within x where processing begins.

Read syntax diagramSkip visual syntax diagram>>-INDEX(x,y-+----+-)------------------------------------------><
             '-,n-'
 
x
Expression to be searched.

x should have CHARACTER type, and if not, it will be converted thereto.

y
Target expression of the search.

y should have CHARACTER type, and if not, it will be converted thereto.

n
n specifies the location within x at which to begin processing.

n should have FIXED type, and if not, it will be converted thereto.

If y does not occur in x, or if either x or y have zero length, the value zero is returned.

n must be greater than 0 and no greater than 1 + LENGTH(x).

If n = LENGTH(x) + 1, the result is zero.


Terms of use | Feedback

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