|
Lim Hock-Chai wrote:the
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
chance the function will run in its own thread; IIRC it is the NOTshould
FENCED clause which will encourage, but not require, that the SQL
run the function in the primary thread. The function runs in\from the
LIC, thus no stack information will be available. If the primarythread
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 attemptsmight
be required to obtain the information.----------
Regards, Chuck
As an Amazon Associate we earn from qualifying purchases.
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.