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



The simple answer is - you can't.

In designing the ILe COBOL compiler an attempt was made to come up with a design that would have allowed this while maintaining ANSI and IBM COBOL compatibility. We were unable to come up with a practical workable approach.

At the time I had hoped that there would be enough demand from COBOL shops to "do something" that some solution (probably multiple compile units in one source but resulting in a single module - or an extension to the nested program model - or using a "flavor" of OO COBOL) but as far as I know no one ever asked for it and so we are stuck with it.


Jon P.

On Apr 8, 2023, at 8:43 PM, Jay Vaughn <jeffersonvaughn@xxxxxxxxx> wrote:

I do this all the time in RPGLE.
A *module with *nomain, and many exportable procedures that can be compiled
into a *srvpgm.

How and what is the syntax to do this same concept with COBOL?

Does anyone have any examples?

google turned up nothing... the IBM i COBOL ILE guide is ok, but no real
examples on how to do this.

All I would need to see is the code to the module source with at least 2
different exportable procedures in it. From there I'm sure I can figure
out the rest on how to compile to *srvpgm and be called by other ILE
languages.

tia

Jay
--
This is the COBOL Programming on the IBM i (AS/400 and iSeries) (COBOL400-L) mailing list
To post a message email: COBOL400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/cobol400-l.



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.