failsuite RETURN-CODE MOVING, currently sequence number 51
We have chosen to HONOR the IBM RETURN-CODE special register, which contradicts the ISO standard.
Reduced down:
MOVE 1 TO RETURN-CODE.
STOP RUN.
should result in an exit(1).
When you are calling parser_see_stop_run(exit_status), you are passing a temporary with a value of zero, which is consistent with ISO when STOP RUN doesn't have an ERROR phrase.
But consistency with IBM requires that I pick up the value currently in the return_code_register(), which I don't do if exit_status.field is not NULL.
We can be consistent with IBM by supplying exit_status.field set to NULL.