See also Aborting RPC Server Customer Code and Returning Error to RPC Client in the CICS RPC Server documentation.