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

INITIAL
is for documentation only and has no effect.
delim-string
is the identifier of any type of 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.
Example 110 shifts any lowercase letters found in IN-BUFFER to uppercase letters.
Example 110 INSPECT CONVERTING Statement
INSPECT IN-BUFFER
CONVERTING "abcdefghijklmnopqrstuvwxyz"
TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
Usage Considerations:
Action of the INSPECT CONVERTING Statement
The compiler treats a statement of the form
INSPECT source-string CONVERTING compare-string
TO replace-string
as if it were a statement of the form
INSPECT source-string REPLACING
ALL comp-char-1 BY repl-char-1
ALL comp-char-2 BY repl-char-2 ...
In the INSPECT CONVERTING statement, the n th character of compare-string corresponds
to the n th character of replace-string.
Restrictions on Overlapping Operands
The storage area referenced by compare-string, replace-string, or delim-string
cannot be the same as the storage area referred to by source-string, and must not overlap
the storage area referred to by source-string. Violation of this rule produces unpredictable
results.
See these usage considerations in INSPECT TALLYING (page 345):
How Parameter Categories Affect INSPECT
Comparison Operation
BEFORE and AFTER Phrases
LOCKFILE
LOCKFILE prevents other processes from accessing the records in a file. All records remain locked
until either:
You use an UNLOCKFILE statement.
You close the file.
The run unit terminates.
You are executing a transaction with TMF and the transaction ends.
358 Procedure Division Verbs