Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Sprezzatura Ltd | 01 JAN 1993 | 3.01+ | EXPERT | MFS, SELECT.INDEX |
Owners of the new "Modifying Filing System" book from RevTI will be aware that it is now possible to query an MFS to see if it is capable of a specific type of search, so that the programmer does not have to encode the logic him/herself. This is achieved by calling the filing system as in the following code example
OPEN "MEMBER" TO PRIMARY_FILE_VAR THEN BFS = PRIMARY_FILE_VAR<1,1> ; N_FS = BFS<1,1,1> HANDLE = DELETE( PRIMARY_FILE_VAR, 1, 1, 0 ) NAME = "FAMILY_NAME" ; FMC = @FM :@FM : @FM : 1 RECORD = 7 ; STATUS = 0 CALL @N_FS(33,BFS,HANDLE,NAME,FMC,RECORD,STATUS) END
Here the NAME is set to the dictionary item to check, the FMC to a case insensitive flag, RECORD to a code indicating the type of search to check for (7 is GT) and STATUS to 0 indicating a test call.
Whilst the documentation records that the results will be returned in RECORD they are in fact returned in FMC.
(Volume 4, Issue 8, Pages 12,13)