COBOL Manual for TNS/E Programs (H06.03+)

Procedure Division Verbs
HP COBOL Manual for TNS/E Programs520347-003
9-88
INSPECT TALLYING
position
marks a beginning or ending point for an INSPECT scan cycle. Each
CHARACTERS phrase, ALL phrase, or LEADING phrase can have a
single BEFORE phrase, a single AFTER phrase, or one BEFORE phrase
and one AFTER phrase in either order.
BEFORE
specifies that scanning is up to but not including the character or
characters matching delim-string. If INSPECT does not find
delim-string in source-string, it scans all of source-
string.
AFTER
specifies that scanning starts at the position immediately following the
character or characters matching delim-string. If INSPECT does
not find delim-string in source-string, it does not scan
source-string.
delim-string
is the identifier of an elementary item with USAGE DISPLAY or a
nonnumeric literal. It can be a figurative constant that does not include
the keyword ALL, in which case it represents one character.
ALL
specifies that all occurrences of compare-string are tallied.
LEADING
specifies scanning for consecutive occurrences of compare-string
beginning at the current position within source-string.
compare-string
is the identifier of an elementary data item with USAGE DISPLAY or a
nonnumeric literal. It can be a figurative constant that does not include the
keyword ALL, in which case it represents one character. The compare-
string is the character-string being sought.
BEFORE
AFTER INITIAL
delim-string
VST167.vsd