FIND - section_of
... SECTION [OFFSET off] [LENGTH len] OF ...
This addition restricts the search of the statements
dobj to the section from the
offset specified in
with the length specified in
len. Without the addition, the whole data object is searched.
positions of operand type
i. At least one of the additions
LENGTH must be specified.
If an offset is specified without specifying the length, the data object
is scanned from the offset
off to its end. If a length is specified but no
offset, the offset 0 is used implicitly. The values of
must be greater than or equal to 0 and the section specified by
len must be located within the length of
FIND statement searches from offset 12 and finds the "html" substring at offset 20.
FIND 'html' IN SECTION OFFSET 12 OF `<html><body>This is html</body></html>` MATCH OFFSET DATA(moff). cl_demo_output=>display( moff ).