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



Thanks Chuck, Your explanation fits what I have experienced. Now, the
question is how can I get around this issue with a more solid solution
(since you said NOT FENCED is not a absolute solution). My procedure
calls the QWVRCSTK api for one reason only. It is to make sure the
program-name, being passed in as a parameter, that the caller passed in
does exist in the call stack. Another method that I know of that will
allows me to determine if a program exists on the call stack is to do a
combination call to the QMHSNDPM and QMHRCVPM api. Do you know if this
solution will be a more solid solution to my problem?

Thanks.




"CRPence" <CRPbottle@xxxxxxxxx> wrote in message
news:<mailman.1053.1232152022.21608.rpg400-l@xxxxxxxxxxxx>...
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.