OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
5-6
Initializing the GPI Environment
max-string-length specifies the maximum length (in octets) of a string that the
GPI is allowed to pass in an attribute descriptor. As described later, this relates to the
type of data strings used with the GPI_OM_FETCH_ , GPI_OM_LIST_ ,
GPI_OM_EXAMINE_ , and GPI_OM_INSERT_ procedures.
Setting Object Tree Table Size
As mentioned in Section 3, GPI Object Management, an object tree is the internal
format of a root object in GPI library memory space. max-table-entries and
max-table-data allow you to tailor memory space to building object trees.
The following default values are provided:
max-table-entries: ZGPI-DEFAULT-OT-TBL-ENTRIES (10,000 entries)
max-table-data: ZGPI-DEFAULT-OT-DATA-LEN (2,097,152 octets)
The defaults are suitable for processing a wide range of root objects. However, you can
adjust the values for the specific root objects processed by your gateway.
You can set max-table-entries to match the largest root object anticipated. The
number of entries required by a root object relates to the number of subobjects contained
in a root object, the number of single-valued and multivalued attributes contained, and
the number of values associated with multivalued attributes. To estimate the total
entries for a root object, add the following:
One entry for each subobject contained in the root object hierarchy
One entry for each single-valued or multivalued attribute contained in the subobjects
or in the first-level of the root object hierarchy
One entry for each value of every multivalued attribute contained
Often a root object has many instances of one type of subobject. For example, a root
object with a large distribution list might contain many MH-C-MESSAGE-RD
subobjects. To get the total entries for this group of subobjects, you can multiply the
total entries in one instance by the total number of instances.
The following example shows how to estimate entries for a given root object. Suppose,
for this example, that your gateway processes outbound root objects that have:
A distribution list of 100 names (each a separate instance of MH-C-MESSAGE-RD)
Up to 20 other subobjects in the root object hierarchy
Up to 150 single-valued and multivalued attributes contained in the other subobjects
and in the first level of the root object hierarchy
Up to 250 values associated with multivalued attributes contained in the other
subobjects and in the first level of the root object hierarchy
Using a sample of your root object and the GPI Reference Manual, you can determine
the total entries for each instance of MH-C-MESSAGE-RD. You count an entry for the
MH-C-MESSAGE-RD subobject itself, and an entry for the MH-C-OR-NAME
subobject contained within it. You also count an entry for each optional and required