For example:
2340-PARSE-WTN.
* some code here
IF SYNTAX-ERROR-FOUND
PERFORM 2850-REPORT-SYNTAX-ERROR
GO TO 2340-EXIT.
PERFORM 2345-ADD-WTN-TO-LIST.
2340-EXIT.
EXIT.
It is amazing how often some people use a GO TO when all they need
is an ELSE. Change the end of this paragraph to:
IF SYNTAX-ERROR-FOUND
PERFORM 2850-REPORT-SYNTAX-ERROR
ELSE
PERFORM 2345-ADD-WTN-TO-LIST.
IF NOT SYNTAX-ERROR-FOUND
PERFORM 2345-ADD-WTN-TO-LIST.
There may be multiple GO TO statements or other complications. Maybe
you can find an easy rearrangement and maybe you can't. If you find
yourself staring at it very long, leave it alone and come back to it
later. In the early stages of the rewrite, just try to eliminate the
maximum number of GO TOs with a minimum of effort.