z/TPF collection support database from a z/TPF system perspective

The applications that use z/TPF collection support (z/TPFCS) can be written with minimal knowledge of the z/TPF database. However, system database administrators who maintain the z/TPF database need to understand, at some level, how z/TPFCS stores collections in the z/TPF database. Such knowledge is helpful in detecting database corruption and in taking appropriate action.

System programmers also will benefit from a high-level understanding of how z/TPFCS represents and stores collections in the z/TPF database. z/TPFCS uses pool records to represent and manage collections. These pool records often contain data that represents displacement pointers that are used when a portion of an associated collection is read into memory. If a defective application corrupts pool records that z/TPFCS uses, it is possible for the z/TPFCS program to either detect a severe error or, depending on the nature of how the data is corrupted, the z/TPFCS code itself could experience a CTL-3 or CTL-4 system error. Such exceptions would be caused by defective applications that have corrupted the z/TPFCS displacement pointers for a collection, and would not necessarily be caused by defects in product code.

The way that z/TPFCS stores collections physically in the z/TPF database differs vastly from how those collections appear to an application programmer who writes programs that create and use those collections. For example, even if a key sorted set (dictionary) collection is small enough for z/TPFCS to file all of its data elements and their keys in a single 4-K record, those data elements and their keys might very well be written in that record in random physical order. z/TPFCS would keep track of the conceptual order as seen by application programs that access that key sorted set (dictionary) by maintaining pointer fields (locators) that it also stores with the data and their keys. The existence of these locators is totally hidden from application programs that access the key sorted set (dictionary).

There is no set way in which z/TPFCS chooses to store a given collection in the z/TPF database. Even two collections of the same type and the same number of elements can be stored by z/TPFCS in different ways in the same z/TPF database.

The following provides information about how z/TPFCS represents collections so that problems such as data corruption can be detected and corrected. While you might have to call your IBM® representative if the tools such as z/TPFCS capture and restore of collections are not enough to correct data corruption, it is imperative that you read this section to be able to work with your IBM representative to reach your goals.