![]() |
![]() |
|
|
Loading Field Tables
Upon the first call, Fldid() loads the field table files and performs the required search. Thereafter, the files are kept loaded. Fldid() returns the field identifier corresponding to its argument on success, and returns BADFLDID on failure, with Ferror set to FBADNAME. (If FML32 is being used, Ferror32 is set, instead.)
To recover the data space used by the field tables loaded by Fldid(), you may unload all of the files by calling the Fnmid_unload() function.
The function Fname() acts in a fashion similar to Fldid(), but it provides a mapping from a field identifier to a field name. It uses the same environment variable scheme for determining the field tables to be loaded, but constructs a separate set of mapping tables. On success, Fname() returns a pointer to a character string containing the name corresponding to the fldid argument. On failure, Fname() returns NULL.
Note: The pointer is valid only as long as the table remains loaded.
As with Fldid(), failure includes either the inability to find or open a field table (FFTOPEN), bad field table syntax (FFTSYNTAX), or a no-hit condition within the field tables (FBADFLD). The table space used by the mapping tables created by Fname() may be recovered by a call to the Fidnm_unload() function.
Both mapping functions and other FML functions that use run-time mapping require FIELDTBLS and FLDTBLDIR to be set properly. Otherwise, defaults are used. (For the default values of these environment variables, see Setting Up Your Environment for FML and VIEWS.)
See Also
![]() |
![]() |
![]() |
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|