The format of the field_name statement is illustrated below.
A field_name in a dictionary statement can be defined by its position in the record and its length and format type (p,l,f). Length and format type are optional. A field_name can also refer to a parsed field (%pp).
The rules for fields specified in a control statement always apply to a field specified as a dictionary_name since internally MFX substitutes the actual field specification. For example, if you specify a format, take care that the format of the field_name is acceptable on the MFX control statement. For example, consider the dictionary_name CITY, defined by the following dictionary statement:
However, the field_name CITY could not be used on a DUPKEYS AVG control statement because CH is not a valid format with AVG.
Note that you can specify a field_name with p, l, and f, then use the field_name in a control statement that only requires p and l. MFX will substitute p and l during processing and ignore the f specification. For example, consider the following dictionary statements:
Suppose you use these field_names in the following control statements:
Based on the field_names defined in the dictionary statements, MFX will make the following substitutions:
-
In the SORT statement, 'Account#' is replaced with '1,12,CH'.
-
In the DUPKEYS statement, 'CheckAmount' is replaced with '23,6'.
For more information on format substitution, refer to the Using Dictionary_names in MFX Control Statements.
The following three subsections describe the rules for specifying position (p), length (l) and format (f) in field_name dictionary statements.