opt_exclude_null_key_or_index_entries_.htm
Navigation: Language Reference > 5 - Declaration Attributes > Variable and Entity Attributes >====== OPT (exclude null KEY or INDEX entries) ====== | |
OPT
The OPT attribute (PROP:OPT) excludes entries in the KEY or INDEX for records with “null” values in all fields comprising the KEY or INDEX. For the purpose of this attribute, a “null” value is defined as zero in a numeric field or all blank spaces (20h) in a string field.
Example:
Names FILE,DRIVER('Clarion'),PRE(Nam) !Declare a file structure
NameKey KEY(Nam:Name),OPT !Declare name key, exclude blanks
NbrKey KEY(Nam:Number),OPT !Declare number key, exclude zeroes
Rec RECORD
Name STRING(20)
Number SHORT
END
END
See Also:
opt_exclude_null_key_or_index_entries_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1