In relational databases it is very common that relations exist between the records in different files. A file on itself is often no more than a means of storing a lot of records of the same type, while individual records may have a relation to records in other (or even the same) file. Suppose the following example where there are two files involved: "Orders" and "Relations":
Orders |
|
Relations |
||||||
Order ID |
|
Date |
Customer ID |
….. |
|
Relation ID |
Name |
….. |
….. |
|
….. |
….. |
….. |
|
….. |
….. |
….. |
23473856 |
|
20020112 |
237648454 |
….. |
|
237648454 |
Acme Inc. |
….. |
23473857 |
|
20020112 |
948534548 |
….. |
|
….. |
….. |
….. |
….. |
|
….. |
….. |
….. |
|
948534548 |
Insurance Inc. |
….. |
|
|
|
|
|
|
….. |
….. |
….. |
In this example the connection between a record from the "Orders" file and a record from the "Relations" file is by the "Relation- IDs" stored in the "Customer ID" fields of the records of the "Orders" file. Given a particular record from the "Orders" file the customer that placed the order is identified by the "Relation ID" stored in the" Customer ID" field of this record.
When describing the example in the ITP/SDK for iSeries one would generate two Entries; Order and Relation. To indicate the connection between Order and Relation, Relation must be registered as a Subentry of Order. To complete the Subentry definition the Field to be used to make the connection (Customer ID from the Entry Order) must be defined as the Actual parameter in the Entry Subentry relation.

Using option "17=Sub entries" with an Entry on the panel Work with Entries displays the list of all Subentries of the Entry on the panel Work with Sub entries.