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



Hi Neill,

It does seem to me that this level of complexity is something that a managed
language shields you from.

That's the theory... You don't need to understand how this works under the covers because it's all taken care of for you. However, I've found this type of knowledge to be beneficial...

You'd be amazed at how often it comes into play.

However if I have followed this correctly, your example of the 3 parm
procedure only being passed 2 parms in an SQL UDF call the problem is that
the descriptor is not set?

Well, if the descriptor (or at least the count) had been set, you'd be able to detect the missing parameter properly. Personally, I wish IBM had made it manditory that the parameter count be included in every call to every procedure (like they did for programs).


I am guess there is a valid reason the descriptor is not set? Or has someone
been a bit lazy :-)

By default, the parameter count isn't set from Cobol or C programs. (Though, you can force it to set the count by telling it to describe the parameters) SQL followed that precedent, but didn't give you the option to describe the parameters.

By contrast, RPG always passes at least the parameter count. CL always passes full descriptors, including not just the parameter count, but descriptions of every variable.

As to why the SQL developers made that decision? We can only guess. Unless we can rope one into this conversation, it's purely conjecture.

If you find this to be especially limiting, you might file a DCR with IBM asking them to provide at least a minimal descriptor when SQL calls an external UDF. Personally, though, I don't find it to be that big of a deal. As long as you understand the problem, you can code it properly.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.