Data flow

Except when the BEFORE or AFTER phrase is specified, inspection begins at the leftmost character position of the inspected item (identifier-1) and proceeds character-by-character to the rightmost position.

The comparands of the following phrases are compared in the left-to-right order in which they are specified in the INSPECT statement:

  • TALLYING (literal-1 or identifier-3, ... )
  • REPLACING (literal-3 or identifier-5, ... )

If any identifier is subscripted or reference modified, or is a function-identifier, the subscript, reference-modifier, or function is evaluated only once as the first operation in the execution of the INSPECT statement.

For examples of TALLYING and REPLACING, see Tallying and replacing data items (INSPECT) in the Enterprise COBOL Programming Guide.