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 Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel

Index Flush

The ability to update indexes from within a program is provided by a system subroutine called INDEX.FLUSH. This routine takes two parameters, the file information and the index information. Using this routine, it is possible to update

     All indexes                   Pass "",""
     All indexes for a file        Pass File_Info,""
     An  index for a file          Pass File_Info,Index_Info

There have been reports that this routine does not work as documented but this appears to stem from a misunderstanding of how the routine works. Regardless of how the routine is called, the same system routine (FILE.DISTRIBUTOR) is called to clear !INDEXING. This routine does not check to see which index it has been asked to distribute to the ! files, it just moves all transaction records to the appropriate ! files clearing down !INDEXING as it does so. Thus regardless of which mode is used, the !INDEXING file will always be clear (assuming all relevant files are attached) after an INDEX.FLUSH call. If a request was made to update a specific file, all other ! files would have transactions left pending in records 0, 1, 2 etc. If a request was made to update a specific index, all other ! files would have transactions left pending in records 0, 1, 2 etc and the main ! file would have other index transactions pending in records 0, 1, 2 etc.

Note that because of this if there are a large amount of index transactions pending, there can be a considerable delay when INDEX.FLUSH is called even if none of the pending transactions are for the nominated file/index.

Contrary to the documentation it is possible to just pass the name of a file to INDEX.FLUSH (rather than the complete FILE*ACCOUNT*MEDIA_NAME), and it will then resolve the rest of the information itself. This removes the need for additional code at the application level. It is however important to ensure that the file you wish to flush with this command is the currently attached one.

(Volume 3, Issue 2, Page 4)
Pixel Footer R1 C1 Pixel