7.92.1 SUBROUTINE Parameters
Specifies the name of the subroutine that is to be executed. The name used must be unique within the function.
Optionally defines a list of parameters that must be passed to the subroutine by any EXECUTE command that uses it. All parameters must be defined as fields either in the LANSA data dictionary or in the function with a DEFINE command.
Following each field in the parameter list is an optional value that indicates whether the parameter is to be received or returned by the subroutine (or both).
*BOTH, which is the default value, indicates that the parameter is to be received from the value in the callers WITH_PARMS list, and returned into the callers WITH_PARMS value (if it is a field name).
*RECEIVED indicates that the parameter is to be received from the value in the caller's WITH_PARMS list, but not returned into the caller's WITH_PARMS value.
*RETURNED indicates that the parameter is not to be received from the value in the caller's WITH_PARMS list, but only returned into the caller's WITH_PARMS value (if it is a field name).
When executing a subroutine, the parameters specified in the WITH_PARMS parameter of the EXECUTE command must exactly match in number and type the parameters defined in the PARMS parameter of the associated SUBROUTINE command.