× 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 examples in the book invariably show one procedure to a module,
>>which seems to hide the ability to group similar functions into a
>>module. She asked me if that was a rule (one procedure/module), and I
>>said no.

Defining a single procedure per module may be a good idea,
when you get started with ILE.
Because it is easier to compile and bind to (service) programs.
You do not need the binder language, but can use EXPORT *ALL in the
CRTSRVPGM-Command.
But if you are familar with the ILE-Concepts, you'll combine a lot of
procedures
into a single source member (module) and perhaps combine different modules
to a single service program.

>>And what is the correct analogy of a Java Class to an ILE construct? Is
>>it Class is equivalent to Module? Or Class is equivalent to Service
>>program?

It's difficult to compare ILE objects and JAVA classes directly.
A module is nothing else than a compile unit.
A module cannot be called directly (from a command line or via CALL),
but only bound to a program or service program.

If a class has a main method, you may compare it with a program, that
consists of
at least one module with a main procedure and perhaps several modules
without a main procedure.

A service program is nothing else than a collection of several independent
procedures.
In Java the methods (with the exception of static methods) are always bound
to an object.
You may compare a service program, where you use a global data structure to
hold your information
some exported procedures that change this global data structure with a java
class.
But in contrary to an object, you only have a single instance of a service
program per activation group.

That means, you have to make sure, that the data structure contains the
information you need.
i.e. if you have a module that chains a record and you use getter and setter
procedures to get the field values.
Because you can call this procedures from everywhere, you have to pass your
relative record no or unique key and compare them to the previous relative
record no or key, to make sure that it's the record you want.

Birgitta



****************************************************************************
*****************************
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient, any use, disclosure or copying of
this message is unauthorised. If you have received this message in error,
please reply using the sender's email address.

This footnote confirms that this email message has been scanned for computer
viruses. EIG-Ansvar Limited does not accept liability for any loss or
damage, whether caused by our own negligence or not, that results from a
computer virus or defect in the transmission of this email or any attached
file.
EIG-Ansvar Limited - Australia (A.B.N. 21 007 216 506)
Email : insure@xxxxxxxxxxxxxxxx

Eig-Ansvar Limited - New Zealand
Email : insure@xxxxxxxxxxxxxxxx

****************************************************************************
*****************************

--
This is the RPG programming on the AS400 / iSeries (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.