compile Insert BTREE.EQUATES
/*
*  rjc  02-15-15  Copy In From Arev bp
*/

#pragma BLINT_NOWARN

EQU TRUE TO 1
EQU FALSE TO 0

EQUATE MAX.LISTLEN$ TO 4000000
* MTR 9-11-13  WAS 65500

EQU V.INDEX.TYPE TO 0                  ;* VALUE INDEX MARKER
EQU ID.INDEX.TYPE TO 1                 ;* ID INDEX MARKER
EQU LEAF.TYPE TO 2                     ;* VALUE RECORD MARKER
EQU REC.TYPE.IX TO 1                   ;* FIELD # FOR RECORD TYPE
EQU NEXT.LEAF.IX TO REC.TYPE.IX + 1    ;* FIELD # FOR "RIGHT" REC ID PTR
EQU PREV.LEAF.IX TO NEXT.LEAF.IX + 1   ;* FIELD # FOR "LEFT" REC ID PTR
EQU SEP.IX TO REC.TYPE.IX + 1          ;* FIELD # FOR SEPARATORS IN INDEX
EQU OPT.IX TO SEP.IX + 1
EQU VALUE.IX TO PREV.LEAF.IX + 1       ;* FIELD # FOR VALUES IN LEAF
EQU ID.IX TO VALUE.IX + 1              ;* FIELD # FOR IDS IN LEAF
EQU SVM TO \FC\
*
* B+TREE INDEX RECORD FORMAT:
*
* F1: '0' OR '1' - INDICATING A NON-LEAF RECORD(INDEX).
*      0 => VALUE INDEX - SEPARATORS REFER TO VALUES
*      1 => ID INDEX - SEPARATORS REFER TO ID'S
* F2: Multivalued list of separator values
* F3: Associated multivalued list of optional identifiers
*
* THE SEPARATOR VALUES DOUBLE AS RECORD POINTERS
*           D    L    S   <MAX>
*          /     |    |    \______________
*                     |                   \
*                  N    Q   S     SEP  SEP  <MAX>
*
* A SEPARATOR POINTS TO A RECORD CONTAINING INDEXES TO OR DATA WHOSE
*  VALUES ARE LESS THAN OR EQUAL TO THE SEPARATOR VALUE.
*  A <MAX> SEPARATOR IMPLIES THE LARGEST POSSIBLE VALUE
*  FOR LEFT JUSTIFIED INDEXES, <MAX> = @SVM:@SVM:@SVM
*  FOR RIGHT JUSTIFIED INDEXES, <MAX> = 1E4932
*
* RECORD ID'S ARE BUILT AS FOLLOWS:
*
*     F.NAME:"*":OPTIONALIDENTIFIER:"*":SEPARATOR
*       WHERE F.NAME IS THE FIELD NAME OF THE FIELD BEING INDEXED.
*       E.G. THE TOP LINE IN THE TREE ABOVE INDICATES RECORD IDS OF:
*                        (ASSUMING FIELD IS "NAME")
*          NAME**D
*          NAME**L
*          NAME**S
*          NAME**
*    THE OPTIONAL IDENTIFIER IS ADDED IF NECESSARY TO MAKE UNIQUE ID'S
*
* LEAF RECORD FORMAT:
*
* F1: '2'  IMPLYING A LEAF RECORD
* F2: NEXT SEQUENTIAL LEAF ID
* F3: PREVIOUS SEQUENTIAL LEAF ID
* F4: MULTIVALUED LIST OF INDEX VALUES
* F5: ASSOCIATED MV LIST OF IDS FOR EACH VALUE IN F4
*   ID'S SEPARATED BY SVM'S
*
* Source Date: 17:15:53  16 FEB 1988  Build ID: AREV*1.0.2  Level: 2.0
