The allowUnqualifiedItemReferences property specifies whether you can omit container and substructure qualifiers when referencing uniquely named fields in structured records, in text or print forms, or in data tables. Valid values are YES or NO (default).
EGL uses a set of rules to determine the area of memory to which a variable name or field name refers; see Name resolution in an expression.
In the following example, the reference to customerBalance is legal:
package com.CompanyB.CustomerPackage; Record StructCustomerRecord type BasicRecord 10 customerNumber CHAR(6); 10 customerName CHAR(25); 10 customerBalance MONEY; end program BalanceCheck type BasicProgram { allowUnqualifiedItemReferences = YES } myCustomer StructCustomerRecord; function main() customerBalance = 0; end // main end // program
If you change the value of allowUnqualifiedItemReferences to NO (or remove the set-value block, letting the property revert to its default value of NO), EGL cannot resolve the reference to customerBalance. Best practice recommends that you accept the default value of the property and refer to the field as myCustomer.customerBalance. By specifying the container name, you reduce potential ambiguity for EGL, and for people who read your code.