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



Hello,

When my company first started implementing ILE (before I came here), IIRC
IBM had not made their announcement discouraging the use of *MODULEs with
import and export parms (accessed via CALLB). The a few years later IBM
came out in favor of procedures and subprocs (callp, eval) in place of
callb to modules and at that time we stopped developing anything that
would use callb.

Just FYI... CALLB doesn't call a 'module'. It calls a procedure. In the old v3r1 examples, the main procedure of each module always had the same name as the module itself -- so it sort of looked like you were calling the module. But, in truth, you were calling a procedure.

CALLB works on all types of procedures (both sub-procedures and main procedures.)

CALLP can call anything (programs, java methods, sub-procedures or main procedures.) Note that this includes everything that CALLB can do, plus quite a bit more.

I'm not sure if you understood that distinction or not... but I often run into people who think 'CALLB is for modules' and 'CALLP is for subprocedures' which is complete poppycock.

None of this has to do with IMPORT/EXPORT, though... unless I'm misunderstanding what you're saying?


We still have a number of modules that do use import and export parms, and
I've been given the go ahead to have the staff start converting all
*modules (including those accessed via callb) into service programs.

You can't convert a module into a service program. Service programs are built from modules, just as programs are! But, you can bind by reference instead of binding by copy. Is that what you mean?

Again, this has nothing to do with IMPORT/EXPORT. (You can import/export from a *SRVPGM if you like. You can also use parameters with the main procedure of a module.)


My first thought was to simply change the call interface to the module to
make it a prototyped call, using the export fields as parameters.

That sounds okay.


Then in the programs that do the callb, change the import parms to place
them in a data structure using the same field names and attributes which
would be returned from the (new) service program.

Not sure that I understand this... Consider simply calling a procedure and getting back the value of the parameter(s).

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.