KPG1_PRNTH

Locates the outer-most pair of parenthesis in a string

Description:

The routine returns the indices of the first opening parenthesis and the last closing parenthesis in the supplied string. Both are returned equal to zero if either parenthesis is not found.

Invocation

CALL KPG1_PRNTH( STRING, OP, CL STATUS )

Arguments

STRING = CHARACTER ( ) (Given)
String to be searched.
OP = INTEGER (Returned)
Position within STRING at which the first occurence of " (" is located.
CL = INTEGER (Returned)
Position within STRING at which the last occurence of " )" is located.
STATUS = INTEGER (Given and Returned)
The global status.