I have an ado file that calls an external binary executable. Is there any way to capture the return code? I got as far as:

Code:
 ! (program <filein >fileout; echo $?)
which (in Linux or OSX) echoes the return code in the log, but doesn't give the ado file access. A -capture- command usually sets _rc, but

Code:
capture ! program
di _rc
always returns a zero. Any thoughts? There are obvious workarounds, but if there is a "right" way, I'd like to do that.