Remap Variable-Format Part

The remap variable-format part indicates which variable parts are to be included in the remap and describes which items are contained in each variable part.

The following diagrams illustrate the syntax for a remap variable-format part:

<remap variable-format part>

  ┌◄───────────────────────────── , ─────────────────────────────┐
──┴─ <integer label> : <remap variable-format part description> ─┴─────┤

<remap variable-format part description>

      ┌◄─────────── ; ───────────┐
── ( ─┴─┬─<remap data item>────┬─┴─┬─────┬─ ) ─────────────────────────►
        ├─/1\─<filler item>────┤   └─ ; ─┘
        ├─<remap group item>───┤
        ├─<remap link item>────┤
        ├─<virtual data item>──┤
        └─<virtual group item>─┘

►─┬───────────────────────────┬────────────────────────────────────────┤
  └─<SELECT/VERIFY condition>─┘

Explanation

Variable-format records must contain a fixed part. When the fixed part is redescribed in the remap, existing items can be renamed, reordered, or omitted and new filler items and virtual items can be added. However, the record type item must be included from the original data set.

Each variable part which is to be included from the data set must be redescribed in the remap. All of the variable parts can be included or particular variable parts can be selected. User programs which invoke the remap can create, store, find, and delete records of any type, but they can access only items in the variable parts included in the remap.

An integer label is an unsigned integer used to identify the variable part and must correspond to one of the variable parts described in the original data set. The variable parts need not be described in the same order in the remap and the data set.

A remap variable-format part description must appear for each variable part included in the remap. Existing items can be omitted, renamed, or reordered and new filler items and virtual items can be added. Items in the remap must appear in the same variable part which they occupied in the original data set. That is, items in the fixed part must remain in the fixed part, while items in the variable part must remain in the same variable part.

Note: Items need not be declared in the same order in the remap and the original data set. When possible, the original order of items should be preserved to improve run-time efficiency.

Example

Record R includes one variable-format part. The variable-format part includes a virtual item and a filler item that are not present in data set D.

D DATA SET
 (
  T RECORD TYPE(5);
  S REAL REQUIRED;
 ),
1: (
   A1 ALPHA(5);
   N1 NUMBER(4);
  ),
2: (
   B2 BOOLEAN;
   F2 FIELD(8);
  );
R REMAPS D
 (
  X = T;
  S;
 ),
1: (
   A1 ALPHA(5) REQUIRED;
   V1 VIRTUAL NUMBER(3) = 123;
   FILLER SIZE 10;
   N1 NUMBER(4) HIDDEN;
  );