× 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.



Lim Hock-Chai wrote:
I've an export procedure that will call the QWVRCSTK api to
get the call stack info of the current job. It works fine
when calling from a RPG program. However, it failed (Returns
value of N in Information-status field) when it is call from
a sql UDF. Any idea why?

I believe that is the result of the SQL UDF running in its own thread. There is a clause on the CREATE FUNCTION which can minimize the chance the function will run in its own thread; IIRC it is the NOT FENCED clause which will encourage, but not require, that the SQL should run the function in the primary thread. The function runs in\from the LIC, thus no stack information will be available. If the primary thread of the job is being retrieved instead [of the thread dedicated to the function], then a similar origin [per threading] may be the cause, but it would most likely be that the primary thread is initially busy down in the LIC [e.g. starting new threads] such that repeated attempts might be required to obtain the information.

Regards, Chuck

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.