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



In connection with several SQL VIEWs added to our CRM product as the "New Data Access Layer" (mainly for BIRT at this point), we create user-defined functions, by generating (from an RPG program) and executing (via RUNSQLSTM) an SQL script.

At present, the RPG program decides whether or not to begin the script with a DROP FUNCTION, by checking whether the function's *SRVPGM exists.

Unfortunately, if function was already created, and the *SRVPGM for the function has been deleted without doing a DROP FUNCTION, no DROP FUNCTION is generated, and the CREATE FUNCTION fails.

Can somebody who's more familiar with SQL suggest a less fragile way of unconditionally creating (or re-creating) the function and its underlying *SRVPGM, one that won't break under the described conditions?

--
JHHL

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.