BUILD an Access Index

[attrname := ] BUILD(baserecset, [ indexrec ] , indexfile [, options ] );

Form 1 creates an index file to allow keyed access to the baserecset. The index is used primarily by the FETCH and JOIN (with the KEYED option) operations.

Example:

Vehicles := DATASET('vehicles',
     {STRING2 st,
      STRING20 city,
      STRING20 lname,
      UNSIGNED8 filepos{VIRTUAL(fileposition)}},
     FLAT);
BUILD(Vehicles,{lname,filepos},'vkey::lname');
 //build key into Vehicles dataset on last name