TRANSFORM

Transfers control to another procedure.

Syntax

TRANSFORM procedurename [(]«expression»[)]

Parameters

procedurename

The name of the procedure to which execution control is to be transferred.

expression

Parameters or macros for procedurename (formatted as when calling the procedure).

Comments

TRANSFORM transfers execution control to the specified procedure, but does not return control to the calling procedure once procedurename has finished executing. Control returns instead to the "parent" of the calling procedure.

Example

Consider the following sequence of procedures:

01 procedure Proc1 ( )
02  Proc2 ( )       (Control goes to line 12)
:   ... more commands ...
10 endprocedure
11 %------------------------
12 procedure Proc2 ( )
13   transform Proc3 ( )   (Control goes to line 23)
:   ... more commands ...
21 endprocedure
22 %-----------------------
23 procedure Proc3 ( )
24  ... more commands ...
25 endprocedure      (Control goes to line 03)

The normal flow (without TRANSFORM) is Proc1 to Proc2 to Proc3 to Proc2 to Proc1.

The flow for calling with TRANSFORM is Proc1 to Proc2 to Proc3 to Proc1.

 

Related Topics