On 04 Mar 2013 14:37, Thomas Garvey wrote:
The system does call something because each step of the original
program returns a zero in SQLCOD, AND it returns a value from the
UDF. The problem is the value is wrong and I can't get to debug the
service program to find what is going wrong.
I am not sure I understood what was being done to effect debugging,
but it seems what is described for the batch job attempts to suggest
that the UDF code being run in the batch job, is not the code being
debugged; i.e. the breakpoint in the code chosen to debug was never hit.
For that... The output from a TRCJOB would show what specific code was
being run; and presumably would be again on the next run.
Consider that the library list is less relevant if the SQL PATH is
not *LIBL, and furthermore if the EXTERNAL NAME for the routine directs
to a specific [a qualified] service program name [which could be outside
of the library list]. What specific version of the function being
invoked is the first thing to determine, then what that function defines
to be invoked. Library qualifying the function is best to ensure the
former, and that also makes finding-out the latter easier, by a very
specific query of the catalogs.
The CREATE FUNCTION was not offered nor any variants either for
SPECIFIC name or SOURCED; i.e. there might be overloaded or effective
duplicates defined. Verify the routine definition(s) in SYSFUNCS or