Hi Gary
In addiotion to the way Sergey showed, you can also do it using a Private Variable in an in-line SQL Passthrough statement like this:
PRIVATE puRetVal
SQLEXEC( nCon, [EXEC sp_name ] + ?@puRetVal )
On completion, puRetVal will contain the return value.
----
Regards
Andy Kramek