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



I've created this RPGLE procedure/service program that is suppose to return
the calling program. When I call the procedure directly through RPGLE, I
get the name of the program that I'm expecting. However, when I call it
through SQL, I get "
LE_Create_Threa " as the response.

I've put a dump(a) right before the return statement and for some reason,
I'm getting two dumps when issuing through SQL. I'm not sure why.

When you look at the first dump created RTNVALUE = 'WZWW01R MSCHUTTE
WZWW01R QTEMP QILE WZWW01R '

But then there is a second dump. At the end of that dump it says...
"Variable data is not available in a secondary thread".


To test this I've created this simple program.

/define enviro_odw
/COPY QCPYSRC,HSPECS
/COPY QCPYSRC,RTVCALLERC
D rpgcall S 65
D sqlcall S 65
/Free
clear rpgcall;
rpgcall = RetrieveCaller();
clear sqlcall;
Exec SQL
Set :sqlcall = RetrieveCaller();
dump(A);
*InLR = *On;
Return;
/End-Free

This is my create function statement.
CREATE FUNCTION MSCHUTTE/RETRIEVECALLER ()
RETURNS CHAR(65)
LANGUAGE RPGLE
SPECIFIC RTVCALLER
NOT DETERMINISTIC
NO SQL
CALLED ON NULL INPUT
EXTERNAL NAME RTVCALLER(RETRIEVECALLER)
PARAMETER STYLE GENERAL ;

I'm using this code
http://archive.midrange.com/rpg400-l/200209/msg00511.html in
RTVCALLER(RETRIEVECALLER) procedure.

In case you were wondering the value of RPGCALL was "'WZWW01R MSCHUTTE
WZWW01R QTEMP QILE WZWW01R " and SQLCALL was "
LE_Create_Threa"

I've done this before with other sql functions calling external programs.
But I do not get why it appears that the service program is getting called
twice. I believe that this is my issue. Anyone else experience this
before?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.