A variable can be specified as the target of an &GOTO or &GOSUB statement. This variable, after variable substitution, is then taken as a label to which a branch is required.
Example: Label Variables
&GOTO .&MSGID
can read, after variable substitution:
&GOTO .IST350I
and a search for the label .IST350I is made.
Usually, most information input to a procedure contains a unique identifier such as a message number. The ability to branch to a label variable makes it possible to use this unique message number and branch directly to the part of the procedure concerned with processing the message, instead of having to use a number of &IF statements to determine the processing required.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |