Previous Topic: RDL Terminology

Next Topic: RDL Field Type Descriptions


RDL Syntax Rules

Syntax rules for the Record Definition Language are as follows:

As the record definitions are processed by the Prepass Utility or the Interactive User Interface (IUI), they are checked for syntactical validity (but not applicability to the data) and printed. If syntax errors are encountered, each error is underscored by an alphanumeric character identifier, which corresponds to the initial character of an explanatory error message printed directly below the RDL statement in error.

Each RDL specification consists of a field type code and a field length descriptor. Valid field type codes and valid forms for coding field length descriptors are shown in the following tables.

The following example of the use of field definitions with length specifications has the following characteristics:

Field Type

Type of Data Defined

C1, C2, C3

Character data using internal frequency table 1, 2, or 3, as specified

CS

Character data using SHRVL algorithm

GA

Garbage, filler, padding, alignment bytes, and so on.

L

Insert binary length indication (for COBOL users)

MA, MB

Pattern matching

N

Exempt from compression (keys)

PD

Packed decimal data

S, X

Set of expected values

UN

Undefined field

V, VP, VZ

Variable definition

ZL, ZR

Zoned decimal, left- or right-justified, as specified

The following table describes valid field lengths descriptor codes:

Code

Description

Fn

Fixed-length field of length n, where 1<n<16384; n may contain leading zeros but may not exceed eight decimal digits.

FVS

Length determined by the previous type-V field. This descriptor is valid only for types C1, C2, C3, UN, and GA.

VER

Variable-length field extending to the end of the record. This descriptor is valid only for types C1, C2, C3, UN, and GA.

This specification gives the RDL some independence from record length. In particular, the record length can be increased indefinitely without having to recreate the FDT and reimplement the data set. We strongly encourage its use.

Dc

Variable-length field delimited by a given EBCDIC character, c, or end of input record, whichever comes first. The length must be less than 128 bytes. This descriptor is valid only for types C1, C2, C3, UN, and GA. The following field definition, if any, begins beyond the delimiter.