Re: Pro*C exit statement under Concurrent Manager

From: Alvin W. Law <alaw_at_oracle.com>
Date: Thu, 11 Nov 1993 19:18:26 GMT
Message-ID: <ALAW.93Nov11111826_at_ap221sun.oracle.com>


In article <11NOV199310455215_at_arthur> k_carmody_at_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_at_oracle.com ........... Voice: 1.415.506.3390 . Fax: 1.415.506.7299
Received on Thu Nov 11 1993 - 20:18:26 CET

Original text of this message