ISMBLD.SBX 2.1(129) introduced. This is a subroutine version of ISMBLD.LIT which may be more convenient for building files than having to first generate a CMD file, particularly when using the new features.
The file is actually identical to ISMBLD.LIT which is why it has the same version (and hash, for that matter). It determines whether to act as a subroutine or LIT command based on how it is called. In the subroutine mode, the syntax is:
xcall ISMBLD, opflags, status, fspec, keysiz, keypos, recsize, reccnt & {, idadev, infile, maxrecs, idxblksiz, idxlvls, extrablks}
opflags [num, in]
Operation flags (see IBF_xxx in ISMDEF.BSI)
Symbol |
Value |
Description |
---|---|---|
IBF_SECONDARY |
&h0002 |
build secondary index |
IBF_AUTOBLKLVL |
&h0004 |
auto compute block size |
IBF_EXISTING |
&h0008 |
process existing file ( |
IBF_PROGRESS1 |
&h0100 |
progress style 1 (% at cursor location) |
status [f, out]
Return status:
Value |
Description |
---|---|
0 |
success |
-1 |
param error |
-2 |
load terminated in mid-record |
-3 |
file doesn't exist (IBF_EXISTING) |
-4 |
file already exists |
-5 |
load file doesn't exist |
-6 |
expanded version/blocks size requires newer A |
-7 |
main idx doesn't exist (for secondary load) |
30+ |
erf values (during load) |
fspec [string, in]
File to create (no extension)
keysiz [num, in]
size of key
keypos [num, in]
key position
recsize [num, in]
record size
reccnt [num, in]
# recs (initial allocation)
idadev [string, in]
IDA device (e.g. "DSK7:") if not same as IDX
infile [string, in]
Sequential file to load from, or name of main IDX if creating a secondary IDX
maxrecs [num, in]
Expected max # recs (for auto-determination of optimum idxblksiz and idxlvls; 0 to ignore)
idxblksiz [num, in]
IDX block size (default 512)
idxlvls [num, in]
IDX levels (default 3)
extrablks [num, in]
Extra IDX blocks (if omitted, use 50%). 0.05 - 1.00 = % x 100, e.g. 0.5 = add 50%)
Note that although ISMBLD.SBX shares much of the same code as ISMBLD.LIT, it offers the option of allowing ISMBLD to auto-deterring appropriate values for the IDX block size and levels, based on the key size and expected maximum records (while only allocating the file for the desired initial size). Use ISMDMP XXX /V afterwards to confirm the configuration.