RTP Series - RTP9
RTP Series - RTP50
VERBatim - V25
@ATTACK - @Files
Utility Diskette # 3 - Part I
SecureUser
VERBatim - V25
@ATTACK - @Files.System
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
REVMEDIA Revisted
Prompt Help
QTIPS - Improved Menu Help 1
QTIPS - Improved Menu Help 2
@ATTACK - @Macro.Hex
Playing with Scan Codes
Uncommon Knowledge - WC_Detail_Help%
Uncommon Knowledge - WC_Protect_Help%
Make.Index
VERBatim - V114
QTIPS - DOS File Names
DOS Interfacing (Part II)
VERBatim - V116
@ATTACK - @Pri.File
@ATTACK - @Rollout.File
File Variables
How Indexes Are Updated
Index Record Layouts
QTIPS - File Variable of File In SELECT Statement
QTIPS - Amending non-Attached Files
LINEAR HASH FILE STRUCTURES - Part 1
Index Flush
QTIPS - File Handle Structure
Form.List.S
Make.Index
Index Sub Revisited
QTIPS - Make.Index 2.11+
QUERY.SUB
Version 3 Technical Highlights - Creating New Accounts Programmatically
Version 3 TCL Subroutines - Creating New Accounts
Version 3 TCL Subroutines - Creating Tables
Reader's Clinic - Capture Command and Captured Keystrokes
Make.Index
Capture
REVMEDIA Revisted
QTIPS - Assorted Oddments
Capture Playback and Convert.Keystrokes
@ATTACK - @Modal
QTIPS - Modifying EasyWriter To Display Field Descriptions
QTIPS - Equidistant Menu Options
QTIPS - Improved Menu Help 1
QTIPS - Improved Menu Help 2
QTIPS - Securing Menus
QTIPS - Overriding Menu Colours
Utility Diskette # 3 - Part I
Menus and Menu Drivers
QTIPS - Menus Without an Action Bar
QTIPS - Comment Lines In Pulldown Menus
Overlapping Windows And Window Menus
QTIPS - Blank Menus in Windows
QTIPS - Menu Item Pre-Processing
Caching in on the Frames Array - Mike Pope
What's New (and un(der)documented!) In 2.12
Utility Diskette # 4
QTIPS - Winus
QTIPS - Calling an Action Bar from a Pulldown Menu
Bugs and PCs - Indexing 01 vs 1
VERBatim - V77
Index Sub Revisited
Indexing on Xlates
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
Simple Security
Batch.Indexing
QTIPS - Batch.Indexing Close Down
What's New (and un(der)documented!) In 2.12
Reader's Clinic - Fixing %Windows% Using Depend.Update
QTIPS - Updating Indexes
How Indexes Are Updated
REVMEDIA Revisted
Reader's Clinic - Screen Width
Screen Grabber
Reader's Clinic - Slow Multivalued Screen Display
Utility Diskette # 4
Creating Your Own Background Processes
@ATTACK - @Last.Select.Process
Reader's Forum
QTIPS - Menu Item Pre-Processing
Reader's Clinic - Functions and Subroutines
Argument passing - Subroutines and Functions - Mike Pope
Vroom
RTP Series - RTP32
Utility Diskette # 3 - Part I
REVMEDIA Revisted
Redefining Keys
RTP Series - RTP53B
Prompt Help
VERBatim - V124
Popups
@ATTACK - @Environ.Set
@ATTACK - @Edit.Keys
@ATTACK - @Int.Const
@ATTACK - @HW
@ATTACK - @Modal
@ATTACK - @Move.Keys
@ATTACK - @Priority.Int
@ATTACK - @Macro.Mode
Utility Diskette # 3 - Part I
Utility Diskette # 3 - Part II
Utility Diskette # 4
Utility Diskette # 3 - Part I
Utility Diskette # 3 - Part II
Utility Diskette # 4
Simple Security
QTIPS - Hiding Symbolic Source Code
Using One Dictionary With Multiple Tables - Aaron Kaplan - SoftMart Inc
Playing with Scan Codes
QTIPS - Compiling Protection Code
QTIPS - Invalid Code and Command
QTIPS - Code/Command Help
Compiling 64K on a Shoestring by Blaise Wrenn (LexStat Systems Ltd)
DOS Interfacing (Part II)
Reader's Clinic - Preventing Records Being Amended
How Indexes Are Updated
A RevTechie Replies - And Miscellaneous Jottings - Mike Pope - Revelation Technologies (UK) Ltd
Caching in on the Frames Array - Mike Pope
How Indexes Are Updated
QTIPS - Unexpected/Unwanted Modification Of Record On Write
QTIPS - Index Recompilation
File Variables
Argument passing - Subroutines and Functions - Mike Pope
RevTech Replies - Mike Pope (RevTech UK Ltd)
Symbol Table Structure
RTP Series - RTP9
DOS Interfacing (Part II)
Make.Index
QTIPS - Btree.Extract
!File Records
Index Sub Revisited
QTIPS - Stop Lists
Reader's Clinic - Stop Lists
Utility Diskette # 4
QTIPS - Manipulating XREF formulae.

RevMedia FKB

DocumentV1I3A3
TitleMake.Index
KeywordsMAKE.INDEX
FILECOPY
BTREE
XREF
RELATIONAL
INDEX
CAPTURE
TextWhen moving files around the system I'm sure that you could not help but
notice that a FILECOPY removes all INDEXES on the destination file There is
some logic in this but it can make life really difficult when trying to
install new versions of software how can we reinstall the missing indexes?

I know that when I first had this problem I just developed CAPTURE scripts
to call up the main menu go to Files Indexing Update etc etc This was a
mess More often than not a "Stickum" on the menu would get in the way and
my system would sit there flashing at me as the wrong characters got fed
into the wrong screen I thought that there had to be a better way and
started playing around What I thought must be an easy process turned out to
be more complex but it all revolves around a system subroutine called
MAKE INDEX (A routine that puts all the extra necessary pointers and
records onto the system to tell it that it has an index on a field (or to
remove it))

The CALLING syntax is for MAKE INDEX is

CALL MAKE INDEX(File Field name Old record New record)

where
File name of the file the index is on
Field name dict item in the file
Old record compiled dict item before the index was added
New record compiled dict item AFTER the index was added

As you will be aware FROM the documentation on the utility diskette
indexing information is stored in various fields on the indexed dictionary
item When the dictionary item is filed away DICT MFS recompiles it and
adds the new OBJECT code back into the item before writing it away


BTREE INDEXES
A BTREE index is one of the most easy to set up A dictionary item WITH a
BTREE index is distinguished by the presence of a 1 in field 6 Thus to add
a BTREE index to a field we would read in the dictionary item for the field
add a 1 into field 6 write the item out again to recompile it then read it
in to a new variable and call MAKE INDEX E g (assuming no errors
encountered)

DECLARE SUBROUTINE MAKE INDEX
FILE = "DICT USERS"
ITEM = "SURNAME"
OPEN FILE TO DICT THEN
READ REC FROM DICT "SURNAME" THEN
REC<6> = 1
WRITE REC ON DICT "SURNAME"
READ NEW REC FROM DICT "SURNAME" THEN
MAKE INDEX(FILE ITEM REC NEW REC)
END
END
END


XREF INDEXES
This is of necessity the most complicated index to set up When you set up
an XREF index a new SYMBOLIC field is added into the dictionary which is
used to do the XREFing This field has the name field name XREF and contains
a call to the system routine XREF WITH the necessary STOP list and delimiter
information Thus to add an XREF index to a field we must first CREATE this
extra dictionary item AS WELL AS altering the original dictionary item to
tell it that an XREF index exists by adding the name of the symbolic xref
item into field 22 of the original dictionary item Thus (assuming setup as
above)

OPEN FILE TO DICT THEN
READ REC FROM DICT "SURNAME" THEN
GOSUB CREATE XREF
MAKE INDEX(FILE ITEM "" REC XREF)
REC<22> = ITEM : " XREF"
WRITE REC ON DICT "SURNAME" THEN
READ NEW REC FROM DICT "SURNAME" THEN
MAKE INDEX(FILE ITEM REC NEW REC)
END
END
END
RETURN

CREATE XREF:
*
* Generate XREF item here call it REC XREF See listing for logic
*
WRITE REC XREF ON DICT ITEM : " XREF"
READ REC XREF FROM DICT ITEM : " XREF" ELSE
* ERROR handling
END
RETURN


RELATIONAL INDEXES
This is nearly as simple as BTREEs it merely requires that the dict item be
told what it is RELATED to by putting file*field*sort order into field 23
Thus USING the above EXAMPLE to relate the surname field to NAMES file in
the KEYS field in ascending numerical order (assuming setup as above)

OPEN FILE TO DICT THEN
READ REC FROM DICT "SURNAME" THEN
REC<23> = "NAMES*KEYS*AR"
WRITE REC ON DICT "SURNAME"
READ NEW REC FROM DICT "SURNAME" THEN
MAKE INDEX (FILE ITEM REC NEW REC)
END
END
END


(Volume 1 Issue 3 Pages 4 9)
[revmedia/copyrigh.htm]

Page last modified: 30/01/03