MEMINDEX returns an unscaled REAL FIXED BINARY value indicating the starting position within a buffer of a specified substring.
With 3 arguments, the function's syntax is :
|
With 4 arguments, the function's syntax is
>>-MEMINDEX--(--p--,--n--,--q--,--m--)------------------------><
The buffer lengths must have a computational type and will be converted to FIXED BINARY(31,0).
The buffer lengths must be nonnegative
With 3 arguments, the target string-expression must have type CHARACTER (including PICTURE), GRAPHIC or WIDECHAR. The buffer length is interpreted as the number of units of that string type.
With 4 arguments, the buffer lengths specify a number of bytes and the search performed is a character search.
For a VARYING or VARYINGZ string X and string Y, the function MEMINDEX( ADDRDATA(X), LENGTH(X), Y ) will return the same value as INDEX( X, Y ).