INSTRB scalar function

The INSTRB function returns the starting position, in bytes, of a string within another string.

Read syntax diagramSkip visual syntax diagramINSTRB(source-string, search-string ,start,instance )

The schema is SYSIBM.

source-string
An expression that specifies the string in which the search is to take place.
search-string
An expression that specifies the string that is the object of the search.
start
An expression that specifies the position within the source string at which the search for a match is to start.
instance
An expression that specifies which instance of the search string to search for within the source string.

The INSTRB scalar function invoked with character or graphic strings as the first two arguments is equivalent to invoking the LOCATE_IN_STRING function with OCTETS specified. The INSTRB scalar function invoked with binary strings as the first two arguments is equivalent to invoking the LOCATE_IN_STRING function without a string units argument.