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



1. I would not agree that the following items relate specifically to ILE. ILE - Integrated Language Environment - refers to the environment in which an RPG program module is compiled and executes.
It allows for multi-language programs, improved memory management and inter-program communication. ILE is not language specific.
The following notes specifically refer to RPG, but may be relevant to other languages such as ILE COBOL and ILE C.

2. The procedure and the subroutine are called and executed away from the calling code. For exampoe, an invoicing program and a credit note program can both use the same sales tax procedure or subroutine. A procedure is a recent innovation - subroutines came in a very early release of RPG.
2a The sales tax procedure can exist as a compiled module and linked into the executable program as the final compilation step. It can have values passed into it as parameters, and can return a value as a return parameter.
The input values may be changed from within the procedure - thus they may in fact be input / output parameters.
A constant may be passed as an input parameter.
Parameters may be passed as values or as pointers.
All variables defined in a procedure, apart from parameters, as local to the procedure.
Local variables retain their values from call to call within each run of th program.
Variables which are input / output to the program are global.
Subroutines may be defined within a procedure.
Such subroutines are local to the procedure.
A procedure can be an external procedure, in that it is compiled separately and linked in as the final compile step.
An internal procedure is coded inline with the program, or included with a copy statement.
2b A subroutine is typically defined at the end of the calcs.
It does not take nor return parameters.
All subroutine variables are global.

3 The purpose of protoyyping is to proviude a single definition for the calling of a procedure. It lists the parameters - if any - of the procedure and some related information.
In practical terms, the prototype ensures consistency across the prototype and the associated calls.
Each program which calls thye procedure must contain the prototype statement(s), either inline or by use of a copy statement.

4 EXPORT and IMPORT, to put it simply, are used to copy data definitions between procedures.

5a A procedure may be called by a bound call.
5b A procedure may be coded inline, or it may be copied by a copy statement, or it may exist as a separately compiled object and linked in as the final compile step.


I hope this helps.

John McKay mba
www.rpglanguage.com
www.mckaysoftware.ie

----- Original Message ----- From: "Adam West" <adamster@xxxxxxxxx>
To: <rpg400-l@xxxxxxxxxxxx>
Sent: Wednesday, January 07, 2009 2:45 AM
Subject: Some ILE questions.


HI In ILE, I have had trouble understanding some of these concepts.

the Procedure, is the same as a subroutine? except for the fact that you can pass parameters and have different data types?

What is the purpose of prototyping Procedures?

What does the Export and Import do?

Typically the Procedure is bound or is it brought in via a /Copy directive?




--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-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.