You are here: Field Rules Reference > Field Rules Summary > GlobalFld

GlobalFld

Use this field level rule to speed the processing of fields used repeatedly throughout a form set.

Frequently a field rule is called to retrieve the same record over and over, which slows batch processing. Using this rule helps you avoid unnecessary repetition and therefore speeds processing.

     
Note The name of the field in the FAP file (the field name in the XDB file) and the source name of the field in the XDB file must be identical for this rule to work correctly.

Syntax

GlobalFld ( )

To use this rule, you must have an XDB.DBF file. You set up the XDB file as shown in the examples below.

The Record field column in an XDB record can be just about anything. If you are importing the fields from a file, the system defaults the record field to the name of the source file you are importing.

If you import the fields from a COBOL Copybook, the record column field is assigned the name of the higher level group that owns the field.

Keep in mind that you cannot use the GlobalFld rule if the field data is not going to be global in scope. For instance, overflow and sub-extract situations where you expect the next occurrence of the field to get a different result are not candidates for the GlobalFld rule.

The SourceFile record member is not used in looking up XDB records. XDB records are looked up by the destination field name alone.

     
Note When using the GlobalFld Rule, the XDB record replaces the entire record. Remember, it is a global field, therefore the assumption is that all references to the field are identical. If you want to make common rule definitions, but override certain members in individual files, use the MASTER.DDT file instead of the GlobalFld rule.

When the system executes this rule, it first checks the Dictionary rule by the field name key. If the record exists, it returns the value — here InsuredName. If not, it looks into XDB and gets the original field rule, such as Move_It.

Then the system executes the field rule to get the value and returns it. Finally, it stores the record in the dictionary. The next time that record is required, the system gets the value from the dictionary.

     
Note After you run the GlobalFld rule, you must run the Dictionary rule to terminate the XDB and free memory.

See also