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
2. Place your module with the procedure in a service program
3. call the procedure/function from an other module using
CALL PROCEDURE procname
RETURNING INTO result
Here is an example from the archive of this mailing list:
COBOL Programming on the iSeries/AS400 <cobol400-l@xxxxxxxxxxxx>
[COBOL400-L] Procedure equivalent in Cobol
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
I'd like to know if there's an equivalent to RPG's subprocedures and all
As an Amazon Associate we earn from qualifying purchases.