11.3.3. The Special Variable RC
When an ERROR or FAILURE condition is trapped, the Rexx special variable RC is set to the command return code before control is transferred to the target label (whether by CALL or by SIGNAL).
Similarly, when SIGNAL ON SYNTAX traps a SYNTAX condition, the special variable RC is set to the syntax error number before control is transferred to the target label.