In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

QTIPS - 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


0001    OPEN "MEMBER" TO PRIMARY_FILE_VAR THEN
0002      BFS = PRIMARY_FILE_VAR<1,1> ; N_FS = BFS<1,1,1>
0003      HANDLE = DELETE( PRIMARY_FILE_VAR, 1, 1, 0 )
0004      NAME = "FAMILY_NAME" ; FMC = @FM :@FM : @FM : 1
0005      RECORD = 7 ; STATUS = 0
0006      CALL @N_FS(33,BFS,HANDLE,NAME,FMC,RECORD,STATUS)
0007    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)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel