Referential Integrity
Referential Integrity
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)
VERBatim - V1
VERBatim - V2
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
Referential Integrity
Reader's Clinic - Related Windows
Redefining Keys
Referential Integrity
@ATTACK - @Edit.Keys
@ATTACK - @Environ.Keys
@ATTACK - @Int.Const
@ATTACK - @Move.Keys
@ATTACK - @Priority.Int
@ATTACK - @Macro.Keys
@ATTACK - @Macro.Mode
Playing with Scan Codes
Uncommon Knowledge - WC_Unkeys%
Uncommon Knowledge - WC_Except_Keys%
Uncommon Knowledge - WC_Soft_Keys%
Make.Index
!File Records
Relational Indexes - Reordering
Referential Integrity
QTIPS - Deleting Master Relationally Indexed Records
Utility Diskette # 4
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
Vroom
RTP Series - RTP32
Utility Diskette # 3 - Part I
QTIPS - Using @Upper.Case and @Lower.Case with Foreign Languages
@ATTACK - @Lower.Case
@ATTACK - @Upper.Case
Sorting out Collation Sequences by Mike Pope
SecureUser
VERBatim - V86
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
Reader's Clinic - Fixing %Windows% Using Depend.Update
QTIPS - Updating Indexes
How Indexes Are Updated
REVMEDIA Revisted
SecureUser
VERBatim - V25
@ATTACK - @Files.System
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
REVMEDIA Revisted
RTP Series - RTP42
VERBatim - V65
Argument passing - Subroutines and Functions - Mike Pope
DOS Interfacing (Part II)
Relational Indexes - Reordering
QTIPS - Embedded SQL
QTIPS - Compiling Protection Code
A RevTechie Replies
VERBatim - V77
Batch.Indexing
QTIPS - Batch.Indexing Close Down
What's New (and un(der)documented!) In 2.12
File Variables
Argument passing - Subroutines and Functions - Mike Pope
RevTech Replies - Mike Pope (RevTech UK Ltd)
Symbol Table Structure
How Indexes Are Updated
QTIPS - Unexpected/Unwanted Modification Of Record On Write
Viewer
QTIPS - Using INIT.VIEW with Printers
REVMEDIA Revisited
QTIPS - Sub-Headings in RLIST (Revisited)
Popups
Catalyst Tips
Reader's Clinic - Functions and Subroutines
Argument passing - Subroutines and Functions - Mike Pope
QTIPS - Break-On Date Fields
IConvs / OConvs
Reader's Clinic - Functions and Subroutines
Reader's Letters - Jim Owen
Playing with Scan Codes
Argument passing - Subroutines and Functions - Mike Pope
RTP Series - RTP9
DOS Interfacing (Part II)
RTP Series - RTP7
Capture Playback and Convert.Keystrokes
RTP Series - RTP8
QTIPS - Make.Index 2.11+
Reader's Clinic - Page Marks in Windows

RevMedia FKB

DocumentV2I1A5
TitleRelational Indexes - Reordering
KeywordsRELATIONAL
INDEX
REORDER
NO.PROTECT
%%SI%%
TextIn an effort to introduce some referential integrity into relational
indexes the ! code produced for a !file does not permit the modification of
fields containing multivalued lists of related keys where those keys are
maintained by a relational index on another file Thus if an invoice file
were relationally indexed via the customer number to an invoices field in
the customer record it would not be possible to amend these keys USING a
data entry window/editor on the customer record

This makes sense but like all enforcing actions it can occasionally be a
little annoying This is especially the case when the user wants to
periodically amend unsorted relational INDEXES to ensure that the most
commonly used values appear at the top of the list Or there may be a
requirement to allow the user to update a relational index "from either
end"

As the system is able to do this (to update relational INDEXES in the first
place) it follows that we must ALSO be able The key lies in an area of
system LABELLED common called %%SI%% used for storing information for SI MFS
and the ! code There are 11 VARIABLES ASSOCIATED WITH this area being
MAX UPDATE SIZE INDEXES INDEXES FILEVAR NO PROTECT OLD REC OLD FLAG
OLD FV OLD ID DICT FVS% BATCH MODE% and UPDATE ITEM% The variable that
we wish to use is NO PROTECT

If NO PROTECT is set to true before an attempt is made to write to a
relationally indexed field the write will be accepted and the update
performed The applications of this are many but a simple application
designed to allow the user to view the index values in a popup and reorder
these values is given below


SUBROUTINE RELATIONAL_SORT(FILE REC FIELD)
* Author AMcA
* Date April 1990
* Purpose To permit the reordering of rel mvs
*
COMMON /%SI%/A B C NO PROTECT E F G H I J K
DECLARE FUNCTION POP UP
OPEN FILE TO SRC_FILE THEN
READV DR FROM SRC_FILE REC FIELD THEN
GOSUB REORDER
END
END
RETURN

REORDER:
CONVERT @VM TO @FM IN DATA_RECORD
MSG = "Please use the arrow keys and to"
MSG := "|reorder when finished"
DR = POP UP(0 0 "" DR "" "R" "S" MSG "" "" "" "")
IF DR THEN
CONVERT @FM TO @VM IN DR
NO PROTECT = 1
WRITEV DR ON SRC_FILE RECORD FIELD
END
RETURN


(Volume 2 Issue 1 Page 8)
[revmedia/copyrigh.htm]

Page last modified: 08/02/03