170
Examples
KEYED A$+"_"+B$,10,100,50,ERR=1090 creates a Keyed file with this structure:
Maximum Record size ..........:
50
Maximum # records ............:
100
Current # records ............:
0
Size of key block ............:
3072 bytes
External key size ............:
10
KEYED "CSTFLE1",6,,140 also creates a file with an external primary key (6 bytes).
KEYED "CSTFLE2",6,[1:1:10],,500 creates a file with an external primary key
(6 bytes) and a single internal alternate key.
KEYED "CSTFLE3",[1:1:6],[2:1:10],,500 creates a multi-keyed file with 2
internal alternate keys. Below, the alternate key 0 (field 1) is the primary key:
Keyed file: C:\OTHER\MANUALS\PVX\CST\CSTFLE3
Maximum Record size ..........: 500
Maximum # records ............: (No limit)
Current # records ............: 0
Size of key block ............: 2048 bytes
External key size ............: 0
Alt. key 0 ...................: [1:1:6]
Alt. key 1 ...................: [2:1:10]
KEYED "CSTFLE4",6,[2:1:10]+[1:1:6] creates a file with an external primary
key, and a composite internal alternate key:
Keyed file: C:\OTHER\MANUALS\PVX\CST\CSTFLE4
Maximum Record size ..........: 256 (Variable)
Maximum # records ............: (No limit)
Current # records ............: 0
Size of key block ............: 2048 bytes
Record Expansion factor ......: 10%
External key size ............: 6
Alt. key 1 ...................: [2:1:10]+[1:1:6]
To use a variable for the key definition:
X$="[1:1:6],[2:1:10]"; KEYED "CSTFLE",X$,,500
X$="6,[1:1:6],[2:1:10]"; KEYED "CSTFLE",X$,,500