![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Please be more specific about your need. Are you talking about B-trees in general or accessing alternate key indices (which use an internal B- tree structure)? Martin Phillips, Ladybridge Systems Ltd |
#4
| |||
| |||
|
|
HI, HOW DO I USE BTREE IN UNIDATA? VERSION : UniData RDBMS............ 7.1 Connection Pooling....... 7.1 NFA...................... 7.1 RFS...................... 7.1 Device License........... 7.1 EDA...................... 7.1 The current account is version 3.3.2i.b2. |
#5
| |||
| |||
|
|
:CREATE-INDEX MYFILE DICTNAME (you can tell I'm from PICK) :BUILD-INDEX MYFILE Then in BASIC you'd... NAME.KEY = PREF.KEY ; ** the name to start searching TOP.NAME = NULL$ ; ** the top name in the search END.NAME = NULL$ ; ** the bottom name in the search * ** read file for UD indexes OPEN FNAME TO ROOT.ID ELSE CRT EMSG:A.CODE:MSG1: WKAMT = NULL$ GOTO END.OF.PROGRAM END * ** find first & last name in tree topKEY.ID = NULL$ botKEY.ID = NULL$ * ** set top and bottom start placemarks TOP.START = PREF.KEY:ICONV('00', 'MX0C') ; ** UD version END.START = PREF.KEY:ICONV('7B', 'MX0C') ; ** UD version * ** initialize the top and bottom names TOP.NAME = TOP.START END.NAME = END.START * ** get top and bottom name in tree. do the bottom name first as ** the 1st name's index is left for further processing. SETINDEX A.CODE, END.NAME ON ROOT.ID READXBCK END.NAME FROM ROOT.ID ELSE NULL botKEY.ID = @ID SETINDEX A.CODE, TOP.NAME ON ROOT.ID READXFWD TOP.NAME FROM ROOT.ID ELSE NULL topKEY.ID = @ID * ** validate key BEGIN CASE CASE topKEY.ID = NULL$ AND botKEY.ID = NULL$ GOTO PROGRAM.COMPLETE CASE TOP.NAME[1,PREF.LEN] NE PREF.KEY GOTO PROGRAM.COMPLETE CASE TOP.NAME = PREF.KEY GOTO PROGRAM.COMPLETE END CASE Now you would use the READFWD and READBCK keywords to traverse the index. Hope this helps. Bill "alegon" <ale... (AT) bol (DOT) com.br> wrote in message news:1181133860.632275.179600 (AT) p47g2000hsd (DOT) googlegroups.com... HI, HOW DO I USE BTREE IN UNIDATA? VERSION : UniData RDBMS............ 7.1 Connection Pooling....... 7.1 NFA...................... 7.1 RFS...................... 7.1 Device License........... 7.1 EDA...................... 7.1 The current account is version 3.3.2i.b2.- Ocultar texto entre aspas - - Mostrar texto entre aspas - |
![]() |
| Thread Tools | |
| Display Modes | |
| |