location
The point to which control will be transferred. It is required in routine code. It is optional from the Terminal prompt. You can specify location as a single value or as a comma-separated list of values (with postconditionals) and can take any of the following forms:
label+offset specifies a line label within the current routine. The optional +offset is a nonnegative integer that specifies the number of lines after the label at which execution is to start. The offset counts lines of code (including label lines), and counts comment lines; offset does not count blank lines and blank lines within comments. However, offset does count all Embedded SQL lines, including all blank lines.
label+offset^routine specifies a line label within the named routine, which resides on disk. InterSystems IRIS loads the routine from disk and continues execution at the indicated label. The optional +offset is a nonnegative integer that specifies the number of lines after the label at which execution is to start.
^routine specifies a routine that resides on disk. InterSystems IRIS loads the routine from disk and continues execution at the first line of executable code within the routine. If the routine has been modified, InterSystems IRIS loads the updated version of the routine when GOTO invokes the routine. Unlike the DO command, GOTO does not return to the invoking program following routine execution. If you specify a nonexistent routine, InterSystems IRIS issues a <NOROUTINE> error message. For more information, refer to the $ZERROR special variable.
You can also reference location as a variable containing any of the above forms. In this case, though, you must use name indirection. location cannot specify a subroutine label that is defined with a formal parameter list or the name of a user-defined function or procedure. If you specify a nonexistent label, InterSystems IRIS issues a <NOLINE> error message. For more information, refer to the Indirection Operator reference page.
You cannot specify an offset when calling a IRISSYS % routine. If you attempt to do so, InterSystems IRIS issues a <NOLINE> error.