Previous Topic: How the RDL Operates

Next Topic: RDL Syntax Rules


RDL Terminology

To understand how to use CA Compress RDL, understand certain technical terms used to describe the RDL in the following discussion. You code RDL specifications to describe the records that comprise the file that is compressed and expanded. Each RDL specification defines one data field.

Note: Unless otherwise noted, references to the term field in this section means a field as defined to CA Compress, not a record data element.

A field, to CA Compress, is a series of consecutive byte locations, the contents of which have similar compression/expansion characteristics, as determined by the user. The boundaries of fields defined to CA Compress need not correspond with actual field boundaries of data elements. For example, the entire record can be defined to CA Compress as a single CA Compress field.

Fields are differentiated by the type of data they contain (for example, character data, packed decimal data, and so on). Thus, each RDL specification partly consists of a field type code. From the field type code you specify, the CA Compress system selects a compression/expansion algorithm appropriate for the field's content.

In addition to the type of data contained in a field, CA Compress must know the extent of the field; that is, where it begins and ends—the boundaries of the field. Thus, each RDL specification coded contains an indication of the length of the field, in bytes.

The location in the record where the field begins is implied by the sum of the lengths of fields previously defined. CA Compress evaluates user-coded RDL specifications left-to-right and maintains an internal field pointer (IFP). The value in the IFP is initially zero, corresponding to the first position of the record. CA Compress automatically adjusts the IFP value for each RDL specification, increasing it by the length of the previous field definition.

In a few special cases, you may need to set the value of the IFP explicitly by coding a special RDL specification, the Position Function. Use of the Position Function is described later in this chapter.

Field lengths are not always fixed. The field length of a variable-length field must be determinable from information contained in the record. A separate field normally contains the length of a variable-length field, or contains a value indicating the number of times that a variably occurring fixed-length segment appears. CA Compress allows you to perform arithmetic within a field definition to calculate a variable field length, using a special symbol, VS, to represent the calculated value. The VS (Variable Symbol) can be coded in certain field definitions in lieu of an integer length. Detailed description of calculating a value for the VS is presented later in this section.

You may need to repeat an RDL specification twice or more in succession. For example, the record may contain 20 successive packed decimal numbers of identical length. To reduce coding in such cases, the RDL provides for specification of a repetition factor for a single RDL specification or a group of RDL specifications coded consecutively. This RDL specification structure has the same effect as coding the RDL specification or a group of RDL specifications as often, in sequence, as indicated by the repetition factor. This RDL specification structure is referred to as a repetition group. The VS can be coded in cases where the repetition factor is variable and can be calculated from information within the record. This process is described later in this section.

Files can contain multiple record formats, where the format of a particular record can be determined from the contents of 1 or more individual fields. CA Compress allows alternative record definitions, which are effective for particular records based upon the contents of a field. Such an RDL coding structure is referred to as a condition group and is described later in this section.