I occasionally have cause to make a voc pointer lke that:
001 F
002 I_File/INDEX00x
003 D_VOC ---> But 003 D_UVIDX instead.
D_VOC doesn't make a lot of sense since indexes are not structured like VOCs.
My dict looks something like this (I don't know how to format with fixed width font here):
Dct Id. @ID
Type... D
F2..... 0
FORMAT. 20L
F6..... S
Dct Id. @REC
Type... I
F2..... LOWER( @RECORD )
FORMAT. 30L
F6..... M
Dct Id. BYTES
Type... I
F2..... LEN( @RECORD ) + LEN( @ID ) + 24
Dct Id. LINES
Type... I
F2..... DCOUNT( @RECORD, @AM )
Dct Id. PRIMARY.TBL
Type... I
F2..... MATCHFIELD( SUBR( '*FSTAT', @FILENAME, 'PATH' ), "0X'I_'0X'\'0X", 3 )
Dct Id. XVFY
Type... I
F2..... EQS( XLATE( PRIMARY.TBL, @RECORD, [indexed field], 'X' ), REUSE( @ID ) )
FORMAT. 10L
FSTAT is my own sub that returns info to a dict from FILEINFO() &/or STATUS statement.
XLATE() is like TRANS(), except the file nbame is resolved at runtime instead of compiled.
------------------------------
Chuck Stevenson
DBA / SW Developer
Pomeroy
San Ignacio BZ
------------------------------
Original Message:
Sent: 05-26-2022 15:42
From: Manu Fernandes
Subject: Using Indexes within basic
So Yes you can define a voc entre, to adress the index file type 25,
001 F
002 I_File/INDEX00x
003 D_VOC
Use basic INDICES() to define the 00x.
If you use openpath no need for a voc define.
A BSCANgive the same as a read on t25 file without complex work to open it.
Regards
------------------------------
Manu Fernandes
Original Message:
Sent: 05-26-2022 15:29
From: Kathleen Hambrick
Subject: Using Indexes within basic
Looking into this but no, I used to have a voc pointer to the index file itself - not the data file - and I could open that file within basic and read from it...
Thank you for this BSCAN option.
------------------------------
Kathleen Hambrick
Programmer at Colwell
Original Message:
Sent: 05-26-2022 12:28
From: Manu Fernandes
Subject: Using Indexes within basic
Hi
Check BSCAN it's the response of your needs.
Regards
------------------------------
Manu Fernandes
Original Message:
Sent: 05-26-2022 12:24
From: Kathleen Hambrick
Subject: Using Indexes within basic
I remember being able to open an index file on Universe within basic and reading the records in an xref type fashion. Where I am working now isn't using indexes but rather executing multiple external selects from within a program, not ideal.
Does anyone have a simple ditty showing how to open this file within the basic program? Anything special about the VOC entry for the index file?
Thanks,
Kathleen
------------------------------
Kathleen Hambrick
Programmer at Colwell
------------------------------