Determines the distance between the fields f1 and
f2 and places the result (in bytes) in f3 .
Example
Determine the distance between two components of the
demo table SBOOK in the flight reservation system:
TABLES SBOOK.
DATA DIST TYPE I.
DESCRIBE DISTANCE BETWEEN SBOOK-CARRID
AND SBOOK-BOOKID
INTO DIST.
Result: DIST contains the value 15 because exactly two fields,
SFLIGHT-CONNID (4 bytes) and SBOOK-FLDATE (8 bytes), lie
between the SBOOK components CARRID and BOOKID ;
also, SBOOK-CARRID is itself 3 bytes long. The sum of these
values gives the distance between the two components in bytes.