Return code from system function.
Posted in 1998
Ray O'Hagan — — source: Informix-list mailing list archive (1991-1998)
Hi,
I'm running Informix 7.32 on Windows NT server 4.0, and
within a SP I'm executing a system command - but how
do I return the return code to my calling application.
I've tried the ON EXCEPTION and it didn't work e.g.
CREATE PROCEDURE dummy(p_file char(35))
<defines removed>
on exception set sql_err, isam_err, err_info
return 1;
end exception;
system "c:\\bin\\runme.exe"
return 0;
END PROCEDURE;
The command executes fine and returns a non-zero on
error, but the SP never gets the exception and hence
always returns 0 to me.
Is this the right way to do this, or should I go
about it differently.
TIA.
Ray.