JCL RSUB

Man Page Index


Terminates execution of a local subroutine and returns control to a statement line following the GOSUB command that called the subroutine.

 

SYNTAX

RSUB {n}

 

SYNTAX ELEMENTS

n specifies that control should be returned to the n'th statement line after the calling GOSUB. Can be a number, or a direct or indirect reference to a buffer or select register.

 

NOTES

If n is not specified, control will return to the statement immediately following the calling GOSUB.

An RSUB without a corresponding GOSUB will ignored.

 

EXAMPLE 1

010 GOSUB 1001
011 ...
012 ...
.
051 1001 T "Press <CR> to continue...",+
052 S10
052 IP?
053 RSUB

The RSUB command on line 53 will return control to line 11.

 

EXAMPLE 2

010 GOSUB 1001
011 ...
012 ...
.
051 1001 T "Press <CR> to continue...",+
052 S10
052 IP?
053 RSUB 2

The RSUB command on line 53 will return control to line 12.


JCL