TIRFINDX

TIRFINDX is a called module supplied with CA Gen. TRIFINDX is called every time an CA Gen action diagram uses the FIND function.

FIND determines if a substring of text occurs within a string of text. If the substring occurs at least once in the string, FIND returns the starting position of the leftmost occurrence. If the substring does not occur in the string, a zero value is returned.

FIND generates the following COBOL statements:

Statement

Quantity

Call

1

Compute

2

Move

7

Initialize

1

IF

1

Heavy use of this function can drastically increase CPU costs.

Hints

If an action diagram uses FIND more than once for the same string/substring:

  • use FIND once for the desired string/substring

  • save the result in a local view

  • use the local view instead of FIND for the remaining instances

  • pass the local view to the import view of any called action diagrams that need it.

If FIND is used in an action diagram that uses several CA Gen functions, or the action diagram has high CPU usage due to FIND, consider converting the action diagram to an external action block.