COBOL Manual for TNS and TNS/R Programs

Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs522555-006
9-103
INSPECT REPLACING
9 Procedure Division Verbs
INSPECT REPLACING
INSPECT REPLACING replaces occurrences of a sequence of one or more characters
in a data item with a specified value.
source-string
is the identifier of an elementary item or data structure with USAGE DISPLAY.
Inspection proceeds from left to right within source-string.
replacing-phrase
absolute-replacement
CHARACTERS
specifies that any character in source-string can be replaced,
regardless of its value. If you use CHARACTERS, replace-string and
delim-string must each be one character in length.
replace-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.
INSPECT source-string replacing-phrase
VST168.vsd
REPLACING absolute-replacement
matching-replacement
VST169.vsd
CHARACTERS BY replace-string
position
VST170.vsd