TPF Persistent Collections Support
by Michele Dalbo, IBM TPF ID Core Team, and
Daniel Jacobs, IBM TPF Development

TPF persistent collections support is a database manager service for application programs that access TPF persistent collections on a TPF database. Persistent collections are abstract representations of data that maintain their state beyond the life of the entry control block (ECB) that creates them. Persistent collections support provides three collection lifetimes: long-term, short-term, and temporary. Persistent collections support transparently integrates database functionality with the application program and TPF does not need to have any knowledge of the format of the data.

It is extremely important to be able to use a single, client-level application programming interface (API) for saving and managing data regardless of how that data is physically stored on the database. Most companies store their critical data in several different types of databases. Programs that store and access this data need to be aware of the format that the data is in, which potentially limits code reuse and restricts the data format from changing. With a TPF persistent collections database, applications can essentially access and manage the data without the TPF 4.1 system having any knowledge of the contents of the data stored. Furthermore, the TPF persistent collections APIs can be called directly from C and C++ programs.

The TPF persistent collections database consists of user-defined components known as data stores. Each data store can contain multiple collections with several different abstract collection types available in the TPF persistent collections collection library. Each collection consists of zero or more related elements that contain data. The data in each element may be a primitive data type, a structure with subfields, a binary string, a reference to a TPF file, another persistent collection, or even an object.

To increase the productivity of application programmers, TPF persistent collections support provides:

In addition to implementing the collection types efficiently and reliably, TPF persistent collections support provides the following benefits:

The collection library enables you to choose the appropriate abstract collection type for a given condition by providing collections that are complete, systematic, and have a consistent combination of basic properties. These properties help you to select abstract collection types that are at the appropriate level of abstraction. For example, in a particular application you may have the choice between using a bag or a key bag collection. Abag is an unordered collection of zero or more elements with no key. Akey bag is an unordered collection of zero or more elements that have a key. The properties of these two collections will help you decide which one is more appropriate.

Special and Lowercase Characters
TPF 4.1 no longer translates special and lowercase characters in output messages into periods (.) for the following functional messages:

If you have workstations that do not support special or lowercase characters, translate the output into characters that your workstations do support by using the UCCWTOP user exit. This is very important because sending output to a workstation in a format that the workstation does not support can cause unpredictable results. For more information about special characters, seeTPF Programming Standards.

For more information about TPF persistent collections support, see the following publications:

Watch these pages for future articles about TPF persistent collections support.