Newsgroups: comp.databases.oracle
From: alaw@oracle.com (Alvin W. Law)
Subject: Re: Pro*C exit statement under Concurrent Manager
In-Reply-To: k_carmody@arthur's message of 11 Nov 1993 10:45 PST  
Message-ID: <ALAW.93Nov11111826@ap221sun.oracle.com>
Sender: usenet@oracle.us.oracle.com (Oracle News Poster)
Nntp-Posting-Host: ap221sun.us.oracle.com
Reply-To: alaw@us.oracle.com
Organization: Oracle Corporation, Redwood Shores, CA
References: <11NOV199310455215@arthur>
Date: Thu, 11 Nov 1993 19:18:26 GMT
X-Disclaimer: This message was written by an unauthenticated user
              at Oracle Corporation.  The opinions expressed are those
              of the user and not necessarily those of Oracle.
Lines: 35



In article <11NOV199310455215@arthur> k_carmody@arthur (Kevin K. Carmody) writes:
> Please tell me I'm not the first person to try this.
>
> I'm running MPL 9.3.6 on a VAX, and have a Pro*C program that uses the string
> method of execution.  I want the program to tell concurrent manager if an error
> occurs during execution.
>
> The manual says to change the exit statement to read:
>
>	      exit ( EXIT_FAILURE );
>
> But, of course, this cause the compliler to get very angry.  I can't find a .h
> file that references this either.
>
> Oracle Support says:
>
>	     We'll get back to you right away............
>
> Anyway, has anyone succesfully gotten a Spawned, String-Method program to 
> return anything other than a "Normal Completion" message back to concurrent
> manager, and if so, how?

For concurrent programs, instead of using exit( EXIT_FAILURE ), you
should be using CONC_FAILURE(errmsg).  It does a lot more than a
simple exit().  The function call updates the concurrent request table
with the appropriate status and completion message (in this case the
message in errmsg), rollback, disconnect, and then exit.


--
 Alvin W. Law .............................................. Oracle Corporation
 Senior Applications Engineer .................. 300 Oracle Parkway, Box 659306
 Manufacturing Applications .......................... Redwood Shores, CA 94065
 Email: alaw@oracle.com ........... Voice: 1.415.506.3390 . Fax: 1.415.506.7299

