× 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 30-Oct-2014 12:26 -0500, rob@xxxxxxxxx wrote:
I know that I can call a procedure or subprocedure from CL with
CALLSUBR.

Actually that is the means to call a SubRoutine; the Call Subroutine (CALLSUBR) CL command\statement invokes the subroutine.

Can I write a subprocedure in CL? One that accepts multiple input
parameters and returns one output parameter? If so, how?

That can be done, at least where the return value is itself a parameter of the procedure; I am unaware of any support for the CL /procedure/ to act like a /function/ with a return value [except when registered and thus invoked as, an SQL FUNCTION]. That can be done by creating the CLLE module with the command\statement CALLPRC coded to invoke the [sub] Procedure; more appropriately, that is an external procedure defined in a separate ILE CL module [source], as there is no syntax for defining multiple procedures inline to the CL source code.


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.