Type N fields are not compressed. They are placed at the front of each record (after the RDW, if any, and after the type L field, if any) in the same order as they are defined. Type N fields can be used as control fields for sorting, retrieving or updating the compressed record, and are required for key fields.
Type N fields are exempted from the check byte calculation. Thus, they can be modified within the compressed record without a Check Byte Mismatch condition occurring upon re-expansion.
Type N fields cannot appear within conditional or repetition groups. Type N fields must appear at fixed offsets from the start of the record, and their definition must apply to all records in the file. If such a field happens to occur in the record after variable-length fields, variable repetition groups, and/or condition groups, the type N field must be defined before these other fields through the use of a Position Function, which is described later in this section. The total length of all type N fields must not exceed 4095 bytes.
The decision as to whether or not to exempt a field from compression depends upon several factors. Key fields used to retrieve records from the file must be exempted from compression to enable record retrieval. Sort key fields, upon which the file is regularly sorted, and match key fields, for record matching applications, should also be exempted from compression.
When sort key fields are exempted from compression, users can invoke a sort utility program to sort the file in its compressed state, avoiding all expansion overhead. When match key fields are exempted from compression, you can avoid expansion overhead in application programs until it is determined that compressed fields from the record require processing.
Finally, any field at a fixed offset from the record origin, which appears in all records of the file, can be considered for exemption from compression. Consideration must be given to the trade-off between compression ratio and processing overhead. If the field is always or frequently operated upon in application programs, you can exempt the field from compression. Where compression ratio is critical, the field should be compressed. Where minimum processing overhead is critical, the field should probably be exempted from compression. Benchmark testing both ways enables you to determine the optimal trade-off.
| Copyright © 2012 CA. All rights reserved. |
|