home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!noc.msc.net!vixvax.mgi.com!gumby.mgi.com!lundell
- Newsgroups: comp.databases.sybase
- Subject: Problem when calling an RPC from a Stored Procedure
- Message-ID: <1993Jan22.172616.1@gumby.mgi.com>
- From: lundell@gumby.mgi.com
- Date: 22 Jan 93 17:26:16 CST
- Organization: Management Graphics, Inc.
- Nntp-Posting-Host: gumby.mgi.com
- Lines: 23
-
- Hi,
-
- We currently have our Sybase Server running on AIX on an RS 6000. I have
- written a Stored Procedure that makes an RPC call via Open Server to an
- IBM mainframe that has SUPRA.
-
- I am able to get my result sets back just fine when everything is working OK.
- However, I have noticed the following anomaly. If the RPC fails due to the
- user not having an acitve account on the IBM mainframe it appears to return
- -4 (permission error) as expected when I am in ISQL. However, control is not
- returned to my Stored Procedure; but rather it appears to abort when the Stored
- Procedure fails. This unfortunately results in a -1 being returned to the
- clients on the network.
-
- We would like to be able to display a meaningful error message to our users
- of our system. Is there away for me to capture this error code (-4) returned
- from a RPC or to gain control again when I am in the stored procedure?? Are you
- able to read in the SQL Communications Area from a stored procedure??
-
- Thanks in advance!!
-
- -Jim
-
-