DICTIONARY

attr := DICTIONARY( dataset, structure );

DICTIONARY( structure )

attrThe name of the DICTIONARY for later use in other definitions.
datasetThe name of a DATASET or recordset from which to derive the DICTIONARY. This may be defined inline (similar to an inline DATASET).
structureThe RECORD structure (often defined inline) specifying the layout of the fields. The first field(s) are key fields, optionally followed the "results in" operator (=>) and additional payload fields. This is similar to the payload version of an INDEX. The payload may specify individual fields or may use the name of the dataset to payload all the non-key fields.

A DICTIONARY allows you to efficiently check whether a particular data value is in a list (using the IN operator), or to simply map data. It is similar to a LOOKUP JOIN that can be used in any context.

DICTIONARY Definition

The DICTIONARY declaration defines a set of unique records derived from the dataset parameter and indexed by the first field(s) named in the structure parameter. The DICTIONARY will contain one record for each unique value(s) in the key field(s). You can access an individual record by appending square brackets ( [ ] ) to the attr name of the DICTIONARY, which contain the key field value(s) that identify the specific record to access.