tips:revmedia:v3i2a1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
tips:revmedia:v3i2a1 [2023/11/20 14:55] bshumskytips:revmedia:v3i2a1 [2024/06/19 20:20] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Index Flush=====
  
 +^Published By^Date^Version^Knowledge Level^Keywords^
 +|Sprezzatura Ltd|01 JUN 1991|2.03+|EXPERT|INDEX.FLUSH, FILE.DISTRIBUTOR, INDEX, !INDEXING, 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)