GET INDEX OF - FROM - IN statement stores in a NUMBER variable the position of the first occurrence of a specified value in a string or TEXT variable. The first position of a string (the first letter) is considered to be the position number
0. The value
-1 is stored if there are no occurrences.
GET INDEX OF <TEXT or TEXT-VAR> FROM <TEXT or TEXT-VAR> IN <NUMBER-VAR>
DATA:position IS NUMBERPROCEDURE:GET INDEX OF "is" FROM "LDPL is nice!" IN positionDISPLAY position CRLF# Will display 5.