Rexx programs can call other Rexx programs as external functions or subroutines with the CALL (Section 2.3, “CALL”) instruction.
If a program is called with the CALL (Section 2.3, “CALL”) instruction, the program runs in the same process as the calling program. If you call another program by a Rexx command, the program is executed in a new process and therefore does not share .environment, .local, or the Windows/Unix shell environment.
Example 1.41. Calling other Rexx scripts
call "other.REX" /* runs in the same process */
"rexx other.REX" /* runs in a new child process */
"start rexx other.REX" /* runs in a new detached process */
When Rexx programs call other Rexx programs as commands, the return code of the command is the exit value of the called program provided that this value is a whole number in the range -32768 to 32767. Otherwise, the exit value is ignored and the called program is given a return code of 0.