Dictionary A and S-Type Records - Pick Style Data Definitions |
![]() ![]() ![]() |
A and S-type dictionary items are an alternative to the preferred D and I-type items that describe data stored in database files. QM provides a limited subset of the full A and S-type functionality found in other multivalue database environments. There is no difference between A and S-type records within QM.
An A or S-type record has up to 11 fields:
Field 2 of an A or S-type record holds the field number of the data record to which this dictionary entry relates. This must be a positive integer value. A value of zero may be used to refer to the record id. For compatibility with other multivalue database products a value of 9998 or 9999 will be recognised by the query processor as references to the item number within the query and the length of the record respectively. Both of these special cases are better implemented using I-type records. Where field 8 contains an A or F correlative, the value in field 2 is not used.
Field 4 defines the relationship between associated multivalued fields. Within an association, one field is considered to be the controlling item and the remainder are considered as dependant. The controlling field has C;p;q;r in field 4 where p, q, r (etc) are the field numbers of the associated items. The dependant fields all have D;n in field 4 where n is the field number of the controlling field. Internally, Internally, QM converts Pick style association definitions into an association name __n.
Field 7 contains an optional conversion code to be applied immediately before the data is displayed in a query processor report. QM does not support use of A or F-correlative expressions in this field.
Field 8 contains an optional expression to be evaluated to calculate the value of the item. This may be an A or F correlative or a conversion code to be applied to the field identified in field 2 of the dictionary record. Conversion codes appearing in field 8 are applied immediately to the data extracted from the record and hence affect sorting and selection.
Field 9 contains the justification code L, R, T or U that determines the alignment of data in a query processor report.
Field 10 contains the field width to be used in a query processor report.
Important note: In Pick systems, correlatives are processed in an interpretive manner. QM compiles A and S-type dictionary items in a similar way to I-types. This results in better performance but, if one dictionary item uses the value of another, it will be necessary to compile both if changes are made. The COMPILE.DICT command with no record ids will compile all A, C, I and S-type items in the specified dictionary.
QM does not support the LPV (load previous value) data item found on Pick systems as it is dependant on the exact sequence in which the query processor evaluates expressions. The query optimiser of QM may cause this to behave in an unexpected manner. It is always possible to restructure dictionary items that used LPV to work without it. |