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



On 27-Aug-2014 16:02 -0500, Gqcy wrote:
<<SNIP>>

this is a SQL call...
specifically:
Call programlib.SYS001C('parm1vryln','parm2ofevenlongerlength')

looking in QSYS2.PROCEDURES,
in the programlib schema, there is a entry for that program.
but I can't find the source...


There is no /source/ to speak of, arguably, for an External Stored Procedure; just the creation attributes and Parameters. What might be called the /source/ is effectively just the definitional attributes of the parameters, the run-time attributes of the procedure, and the external program name that should be invoked; what is the /source/ of the routine is really whatever was used to create the external program.

The parameter definitions are available from the SYSPARMS data, and all of the other attributes are available from the SYSROUTINE data. However feature(s) that will /retrieve SQL DDL/ should be available, to avoid having to perform the manual review of the data from which to reconstruct the routine. There is the QSQGNDDL API that I had noted in another reply in this thread and the iNav Database SQL feature [that utilizes the QSQGNDDL API], both will reconstruct the CREATE PROCEDURE statement automatically, without any need to review the data in the rows of the SYSPARMS and SYSROUTINE TABLEs [or SYSPROCS or PROCEDURES VIEWs].

After the CREATE PROCEDURE statement has been reconstructed\reincarnated for the existing External SP, issue the DROP PROCEDURE [or DROP SPECIFIC PROCEDURE or either of DROP ROUTINE or DROP SPECIFIC ROUTINE] to rid of the now-defunct definition [per the actual program parameter definitions having changed], then update that retrieved DDL to reflect the new parameter declarations of the CLP, and finally perform the updated CREATE PROCEDURE DDL.

Or, though I have never had the opportunity to use, there is the following ALTER feature available for the routine, to update the Data-Type of the parameters; see the parameter-type in the syntax diagram:

<http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/db2/rbafzaproceduree.htm>
_ALTER PROCEDURE_ (External)


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.