When data field content is similar from record to record, a pattern matching specification may produce more efficient compression than other field type specifications.
Fields defined by this field type are compared with a pattern, and matching characters, as well as character repetitions, are compressed. Type MA fields use the data in the first record as a pattern. Type MB fields use the data in the previous record as a pattern. When SHRINK or EXPAND is called from the user's program, these patterns are set during the initial CALL. Type MB patterns are reset during each subsequent CALL.
Note: Using MA and MB pattern matching causes an 0C4 abend in both CA Compress IMS and MVS Editions. For this reason, pattern matching can only be used with CA Compress/2 and its use is strongly discouraged.
Certain unavoidable restrictions apply to the use of these fields:
The use of type MB requires clarification. In general, the compression obtained with type MB is better than with type MA, but its usage is more restrictive. MB can only be conveniently used for sequential processing, for example, old master updated by transaction file yields new master. The following rules must be followed for this type of sequential update:
Each old master record must be passed to the EXPAND subroutine in sequence. This requirement precludes the use of MA or MB field definitions with ISAM files retrieved randomly.
Each new master record must be passed to the SHRINK subroutine in sequence.
If FDTs are in sequential data set format, the old master file and the new master file must have separate TABLxx DD statements. If the FDTs are in load module format, each master file must have its own SCB. However, these can, and usually do, refer to the same File Descriptor Table. Pattern matching works best when field values are partially or wholly repeated from record to record, as in a file containing multiple consecutive records with the same name and address. It is useful for print files, files that are transmitted, and seldom updated read-only files where the speed of compression—and especially expansion—is more important than compression ratios.
This type involves substantial setup timing overhead per field and should, therefore, not be used for fields shorter than 10 bytes, unless a considerable compression payoff is expected. The longer the field, the less processing overhead for setup is required per byte.
| Copyright © 2012 CA. All rights reserved. |
|