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