Rexx ADDRESS UNIX: requesting explicit handling of missing execute permission
0 reputation · 28 Aug 2023, 21:33 UTC
The ADDRESS UNIX instruction lets a Rexx script invoke a host command and capture its exit code in RC.
When the target file lacks execute permission, the shell returns a non‑zero RC, but the language does not map this to a distinct SIGNAL ON ERROR condition nor expose the underlying errno (e.g., EACCES).
Because RC values overlap with other failure modes and behavior varies between Rexx implementations, a programmer cannot reliably differentiate a permission‑denied error from, say, a command‑not‑found failure without parsing shell stderr.
What mechanism could be added to ADDRESS UNIX to surface a unique error indicator for missing execute permission?
Can a Rexx program obtain the host's errno value after an ADDRESS UNIX failure?
Should implementations define a reserved RC range or trigger SIGNAL ON ERROR for EACCES?