System Parameters
'>K' Enhanced VLR file format
  This functionality is a +PxPlus Exclusive
Description The system '>K' parameter can be used to enable the PxPlus enhanced VLR file format which provides both smaller and faster VLR files, especially when you have large data blocks and small keys.

Files updated while this parameter is enable use a modified key tree structure that is able to pack more keys per file key block. This results in less key blocks and smaller key trees.

Note: VLR files written while this parameter is active are not compatible with ProvideX. However, to revert them back to a ProvideX compatible format, turn off the '>k' parameter then open the file and issue a KEYED LOAD to rebuild the keys.

This new algorithm has been shown to reduce disk space by as much as 30% depending on the file structure and keys.

   
Example To give you an idea as to what this means here is an analysis program (filecheck)

0010 BEGIN
0020 INPUT "File to check: ",X$; IF CTL<>0 THEN END
0030 OPEN (1,ISZ=-1)X$
0040 READ RECORD (1,SIZ=256,IND=0)H$
0050 LET B_SZ=(DEC(H$(241,1))+1)*1024
0060 !
0070 ! Process all segments
0080 !
0090 FOR SEG=1 TO 100
0100 PRINT "Processing:",PTH(1)
0110 LET B_ADR=512
0120 !
0130 WHILE 1
0140 READ RECORD (1,IND=B_ADR,SIZ=B_SZ,ERR=*BREAK)B$
0150 TOT_BLK++
0160 IF B$(1,1)=$FE$ THEN KEY_BLK++; LET KEY_FREE+=B_SZ-LEN(STP(B$,1,$00$))
0170 IF B$(1,1)=$80$ THEN LET DTA_FREE+=DEC($00$+B$(7,2)); DTA_BLK++
0180 IF B$(1,1)=$00$ THEN FRE_BLK++
0190 IF B$(1,1)=$FC$ THEN INV_BLK++
0200 IF B$(1,1)=$FB$ THEN DCT_BLK++
0210 LET B_ADR+=B_SZ
0220 WEND
0230 !
0240 ! Open next segment if present
0250 !
0260 CLOSE (1)
0270 OPEN (1,ISZ=-1,ERR=*BREAK)X$+"."+STR(SEG:"000")
0280 NEXT
0290 !
0300 PRINT "Total Blks:",TOT_BLK:"##,###,##0"," (for",TOT_BLK*B_SZ+512," bytes)"
0310 PRINT "Total Segs:",SEG:"##,###,##0"
0320 PRINT "  Key Blks:",KEY_BLK:"##,###,##0"," (for",KEY_BLK*B_SZ," bytes of which",KEY_FREE," is unused)"
0330 PRINT " Free Blks:",FRE_BLK:"##,###,##0"," (for",FRE_BLK*B_SZ," bytes)"
0340 PRINT "  Inv Blks:",INV_BLK:"##,###,##0"," (for",INV_BLK*B_SZ," bytes)"
0350 PRINT " Dict Blks:",DCT_BLK:"##,###,##0"," (for",DCT_BLK*B_SZ," bytes)"
0360 PRINT " Data Blks:",DTA_BLK:"##,###,##0"," (for",DTA_BLK*B_SZ," bytes of which",DTA_FREE," is unused)"
0370 END

And a program to load a test data file (fileload)

0010 ERASE "tstdta",ERR=*NEXT
0020 KEYED "tstdta",6,0,0,BSZ=8
0030 OPEN PURGE (1)"tstdta"
0040 FOR I=1 TO 10000
0050 WRITE (1,KEY=STR(I:"000000"))"This is record ",I
0060 NEXT I

And the results:

->set_param '>k'=0
->run "fileload
->run "filecheck'
File to check: tstdta
Processing:c:\temp\tstdta
Total Blks:       
99 (for 811520 bytes)
Total Segs:         1
  Key Blks:        54 (for 442368 bytes of which 331450 is unused)
 Free Blks:         0 (for 0 bytes)
  Inv Blks:         1 (for 8192 bytes)
 Dict Blks:         0 (for 0 bytes)
 Data Blks:        44 (for 360448 bytes of which 41202 is unused)
->set_param '>k'
->run "fileload
->run "filecheck
File to check: tstdta
Processing:c:\temp\tstdta
Total Blks:       
64 (for 524800 bytes)
Total Segs:         1
  Key Blks:        19 (for 155648 bytes of which 45325 is unused)
 Free Blks:         0 (for 0 bytes)
  Inv Blks:         1 (for 8192 bytes)
 Dict Blks:         0 (for 0 bytes)
 Data Blks:        44 (for 360448 bytes of which 41202 is unused)

As you can see in this example the file went from 99 blocks down to 64 blocks (a 33% saving in disk space).  In addition, the number of key blocks dropped from 54 to 19 (a 65% saving). Not only does using this option reduce the file size, but also the changes improve execution time by reducing the number of levels in the key tree.

For instance, without the '>K' option, a file with over 62,500 records MUST have a three (3) level key tree regardless of key/block size.  With this new option, a file with a 10 character key size and an 8K block can support a file with well over 250,000 records with only a two (2) level key tree.   

   
Default The default setting for this parameter is OFF.