I've got an AIX batch job that uses isql to execute a stored procedure in Sybase. The stored procedure is returning an error code under certain conditions. I would like for isql to pass that return code to the AIX script.
Can I capture the the stored proc's return code within isql, or do I have to write an output file of some kind and have my AIX script check that?
Here's what the isql command looks like. It's running inside a Korn shell script.
isql -D$database -S$server -U$userId -P$password << EOF
EXEC MY_STORED_PROC $AN_INPUT_PARAMETER
go
EOF