× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Thursday, 05/02/2002 at 09:48ZE10, "Simon Coulter"
<shc@flybynight.com.au> wrote:

>
> I have an interesting problem.  A C program calls another C program in a
> batch job with ALWMLTTHD(*YES) specified.  The call is successful but on
> return to the caller, the calling program is blown out of the water and
> the entire job ends.  No unusual error messages are in the joblog.

Ensure the callee is compiled specifying ACTGRP(*CALLER).

IIRC, if you take all the defaults, CRTBNDC creates programs using ACTGRP
(*NEW).  When the CALLEE is activated, a new AG is created.  When the
CALLEE returns, its *NEW AG is destroyed.  Since you're in ALWMLTTHD(*YES)
process, the process comes down, too.  This is a safety net to prevent
thread unsafe operations, though it is admittedly a "big hammer."

FWIW, the granularity of the "effects" in this scenario has been adjusted
in later releases (only those threads that actually *used* anything in the
other activation group are terminated) in part to accomodate RPG/Java
interoperability.

However, if you can let your CALLEE run in the same AG as its caller,
you'll be better off.

HTH.

-blair

Blair Wyman -- iSeries JVM -- (507) 253-2891
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"I was born not knowing, and have had only a
little time to change that here and there."   -- Richard P. Feynman





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.