z/TPFDF variable-length algorithm support (APARs PH07023 and PJ45698)
DanJacobs 0600007UGV Visits (635)
z/TPFDF variable-length algorithm support provides support for variable-length algorithms in z/TPFDF basic indexes, as well as a variable-length hashing algorithm.
Previously, you were required to define the maximum length of key data for a specific file ID and index path combination. LRECs in index files would be created with space reserved for the maximum key length, regardless of the actual key size. Sizes of the actual key data for a single definition can differ greatly. This potentially leads to wasted space in the subfile, which also leads to unnecessarily large subfile chains that need to be traversed to locate a specific index LREC.
With z/TPFDF variable-length algorithm indexing, you can specify an algorithm string that has a variable amount of key data for a file that uses basic indexing. The corresponding index LRECs have different key data lengths, which can minimize the amount of storage that is required by z/TPFDF indexing.
In addition, all of the previously available hashing algorithms required a fixed amount of data to determine the target subfile or top-level index. It is not always easy for a database administrator (DBA) to determine the best subset of data in an input string to hash on. For example, if the data is an e-mail address, hashing on the first 8 bytes or last 8 bytes can result in a lot of collisions because a lot of the data is repetitive. Furthermore, the length of the possible values can vary greatly, so it is not always clear where the most unique data resides.
With APARs PH07023 and PJ45698, you can specify a variable-length hashing algorithm, #TPFDB12, which uses a variable number of bytes of data in the algorithm argument to find the subfile. The hashing algorithm helps to simplify database design by eliminating the need for database administrators to analyze input data to find the best key data for an even distribution of data and minimize hashing collisions.
You can use the new variable-length hashing algorithm with variable-length algorithms for z/TPFDF basic indexes in the same database.