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.
D rpgcall S 65
D sqlcall S 65
rpgcall = RetrieveCaller();
Set :sqlcall = RetrieveCaller();
*InLR = *On;
This is my create function statement.
CREATE FUNCTION MSCHUTTE/RETRIEVECALLER ()
CALLED ON NULL INPUT
EXTERNAL NAME RTVCALLER(RETRIEVECALLER)
PARAMETER STYLE GENERAL ;
I'm using this code
In case you were wondering the value of RPGCALL was "'WZWW01R MSCHUTTE
WZWW01R QTEMP QILE WZWW01R " and SQLCALL was "
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