Visual RPG 9.0 Language Reference  

GOTO

Allows commands to be skipped by instructing the program to go to another command within the program.

GOTO
Label
(label name)

Parts

Label 

Required.  Names the destination of a GOTO operation.   

Remarks

The GOTO operation allows calculation operations to be skipped by instructing the program to go to (or branch to) another calculation operation in the program.  A TAG operation names the destination of a GOTO operation.

Use a GOTO operation to specify a branch:

A GOTO operation outside a subroutine cannot specify a branch to a TAG or ENDSR operation within that subroutine.

The GOTO command is not allowed within a TRY/CATCH block.

See Also

ENDSR
Labels
TAG