The Field Keyword
Because this type of access will be required so frequently in Data Dictionaries, a special command parameter has been provided to support this within a single message. When the keyword Field is used, the file.field name following it will be converted to a field number.
Set Field_Option Field Customer.Name DD_AutoFind to True
Get Field_NoSpaceLabel Field Customer.Name to sLabel
Most of the Data Dictionary methods that require a field number to be passed are prefixed with Field_ (e.g., Set Field_Option, Get Field_Current_Value). When you see a method that starts with Field_, you know that you need to either pass a field number or use the Field keyword syntax.
Note: The use of the
Fieldkeyword will tell the compiler that the next symbol (in this case,Customer.Name) should not be treated as afile.fieldvariable (which would be a data value) but should represent a field number. If theFieldkeyword were removed, you’d get a table value and not a field number.