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



In normal COBOL you have only sections and paragraphs.

But in ILE COBOL you can:

1. Create a module, where you define a procedure or function with

PROCEDURE DIVISION
USING argument
RETURNING result

2. Place your module with the procedure in a service program

3. call the procedure/function from an other module using
CALL PROCEDURE procname
USING argument
RETURNING INTO result

Here is an example from the archive of this mailing list:
http://archive.midrange.com/cobol400-l/200512/msg00024.html





From:
steelville <steelville@xxxxxxxxxxx>
To:
COBOL Programming on the iSeries/AS400 <cobol400-l@xxxxxxxxxxxx>
Date:
30.09.2009 01:59
Subject:
[COBOL400-L] Procedure equivalent in Cobol
Sent by:
cobol400-l-bounces@xxxxxxxxxxxx



Guys,
I just joined a mixed-code shop, and there's plenty of RPG but most of
the code is Cobol. I know Cobol but I hate spelling it with all caps.

And I poked around in the manuals but can't get clear how ILE is
implemented in Cobol. Could I get direction on this. All I can find so
far is about either CRTBNDCBL and compiling one source member to one
module.

I'd like to know if there's an equivalent to RPG's subprocedures and all
that...

--Alan









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.