Each data item that is included from the data set is identified using a remap data item.
Items can appear in the remap exactly as they do in the data set, be included with one or more changes, or be omitted altogether.
If the item is to appear in the remap exactly as it does in the data set, then only the name of the item need be specified. Items can be redescribed when they are included in the remap. The following changes can be made:
-
The item name can be changed.
-
A new initial value can be specified.
-
The item can be designated as hidden or read only.
-
An item which is not required in the data set can be made required in the remap.
All other attributes must remain the same.
The following diagrams illustrate the syntax for specifying a remap data item:
<remap data item>
──┬──────────────────┬┬─<alpha item name>──┬┬─────────────────────────┬─┤ └─<identifier>─ = ─┘├─<Boolean item name>┤├─<remap data item option>┤ ├─<field item name>──┤└──────<comment>──────────┘ ├─<numeric item name>┤ └─<real item name>───┘
<remap data item option>
┌◄───────────────────── , ────────────────────┐ ──┴─┬─/1\─ INITIALVALUE ─┬──────┬─┬─ BLANKS ──┬─┴──────────────────────┤ │ ├─ IS ─┤ └─<literal>─┤ │ └─ = ──┘ │ ├─/1\─┬─ OCCURS <integer> TIMES ──────────┤ │ └─ REQUIRED ────────────────────────┤ └─/1\─┬─ HIDDEN ──────────────────────────┤ └─ READONLY ─┬──────────────────────┤ ├─ GIVING EXCEPTION ───┤ └─ NO EXCEPTION ───────┘
The following text explains the elements of the syntax diagrams.
The name of an item is changed by using the <identifier> = option. This option only changes the item name. All other attributes remain the same. The new name cannot exceed 30 characters.
When other item attributes are changed, the entire item must be redescribed. All attributes, except those being changed, must be identical in the remap and the data set.
Remap Data Item Option
The remap data item option respecifies the options for the data item being remapped. Any option not specified defaults to the value of that option for the data item in the physical data set. The following table explains the different remap data item options:
Remap Data Items Examples
The following four examples illustrate the DASDL syntax for remap data items.
Example 1
Items A, N, and P appear in the remap as they do in the data set.
D DATA SET ( A ALPHA(10); N NUMBER(S5,2) NULL IS 0, REQUIRED; P REAL OCCURS 10 TIMES; ); R REMAPS D ( A; N; P; );
Example 2
Items A and P have the same name in the remap and the data set. Item B appears as item X in the remap, and item N appear as item Y in the remap.
C COMPACT DATA SET ( A ALPHA(100) SIZE VARYING; B BOOLEAN; N NUMBER(2); P REAL OCCURS 50 TIMES DEPENDING ON N; ); R REMAPS C ( A; X = B; Y = N; P = P; );
Example 3
Items A, F, N, P, T1, and T2 have the same name in the remap and the data set. Item B appears as item Z, item T appears as item X, and item U appears as item Y in the remap. In addition, the remap of item T is made a required item.
D DATA SET ( A ALPHA(10) INITIALVALUE BLANKS, NULL HIGH-VALUE; B BOOLEAN OCCURS 10 TIMES; F FIELD(4); N NUMBER(S5,2); P REAL; T FIELD ( T1 BOOLEAN; T2 BOOLEAN; ); U FIELD ( U1; U2; ); ); R REMAPS D ( A ALPHA(10) INITIALVALUE LOW-VALUE, NULL HIGH-VALUE; Z = B BOOLEAN OCCURS 10 TIMES, INITIALVALUE TRUE; F FIELD(4) REQUIRED; N NUMBER(S5,2) HIDDEN; P REAL READONLY; X = T FIELD ( T1 BOOLEAN; T2 BOOLEAN; ) REQUIRED; Y = U; );
Example 4
Item A is omitted from the remap.
C COMPACT DATA SET ( A ALPHA(50) SIZE VARYING; B BOOLEAN; N NUMBER(8) STORED OPTIONALLY WITH B; ); R REMAPS C ( X = B; Y = N; );