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



<snip>
I have looked into just creating CL modules and attaching them to the
Service Program, but each CL module would need to be contained in its
own
source file, right? I like being able to have many procedures in a
single
module (RPG ILE), if for no other reason than simplicity.
</snip>

This is what the whole concept of modules is about.

You can create a single service program having multiple modules. Each
function is one CL module. You can either call the CL function directly
or wrapper it in a RPG/ILE module and use that to call the CL. The big
advantage to calling a RPG/ILE module first is that you can use result
parameters.

MyLib = CLFN_GetLibraryName(MyPgm);

Although you can do this with a CL, it is not recommended or at least
that is what IBM support told me. They do not support result parameters
from a CL. You can call the CL from the RPG/ILE module and return the
value as a regular parameter and then return the value as a result
parameter from the RPG.

Remember the rule about how to package service programs. Modules in a
service program should have a like function.

The same rule applies to modules. Like functions in the same module. For
example, I have a standard error handler.

The first module has the Throw functions (ERRH_Throw, ERRH_Rethrow). The
second the error message storage functions (ERRH_GetMastMessage, etc)
and the third my ILE error handlers.

This binds together to form one service program XVERRH.

You might just have one service program that contains your CL functions
depending how much it is used.

Oh, and yes you do have to have each CL in a separate module but that is
beauty of ILE. You just end up with one service program object.



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.