When a procedure is called, the parameter argument which is passed can be either a direct value or the name of a variable which contains the appropriate value. For this reason, the way in which this argument is to be interpreted must be defined in the called procedure as part of the parameter declaration. This is done in the TRANSFER-TYPE operand of the SET-PROCEDURE-OPTIONS command.
If TRANSFER-TYPE =*BY-VALUE is set, the value passed in the procedure call is directly assigned to the procedure parameter; if the procedure parameter had already been initialized with another value, this previous value is overwritten. TRANSFER-TYPE= *BY-VALUE is the default setting. *BY-VALUE must be set to enable parameters to be passed for a procedure called in the background.
If TRANSFER-TYPE = *BY-REFERENCE is set, the value passed is interpreted as the name of a variable which the caller has declared and initialized. This variable then serves as a container for the procedure parameter.
The effects of parameter transfer during the procedure call are described in section“Passing procedure parameters”.