Updated September 2026
xcall ISMBLD, opflags, status, fspec, keysiz, keypos, recsiz, reccnt {, idadev, infile, maxrecs, idxblksiz, idxlvls, extrablks, exprecs}
ISMBLD.SBX, the subroutine version of ISMBLD.LIT, may be more convenient for building files than having to first generate a CMD file. 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. It was introduced in A-Shell as part of an ISAM overhaul that vastly improved ISAM Performance, which see for an in-depth discussion of performance issues.
Parameters
opflags (Num) [in]
Operation flags (see IBF_xxx in AHSINC:ISMDEF.BSI)
Symbol |
Value |
Description |
|---|---|---|
IBF_SECONDARY |
&h0002 |
build secondary index |
IBF_AUTOBLKLVL |
&h0004 |
Auto calculate optimum index block size and levels based on keysiz and maxrecs. |
IBF_EXISTING |
&h0008 |
process existing file |
IBF_PROGRESS1 |
&h0100 |
progress style 1 (% at cursor location) |
status (Num) [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
recsiz (Num) [in]
record size
reccnt (Num) [in]
number of records (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 / eventual number of records, used only to improve the auto-configuration/optimization of idxblksiz and idxlvls (IBF_AUTOBLKLVL). Does not set any limitation on the actual maximum growth of the file. See Comments below.
idxblksiz (String) [in]
IDX block size (default 512). Will be ignored (auto-calculated) if the IBF_AUTOBLKLVL flag is set in opflags.
idxlvls (Num) [in]
IDX levels (default 3). Will be ignored (auto-calculated) if the IBF_AUTOBLKLVL flag is set in opflags.
extrablks (Num) [in]
Extra IDX blocks (if omitted, use 50%). 0.05 - 1.00 = % x 100, e.g. 0.5 = add 50%)
exprecs (String) [in]
Deprecated. Functions the same as maxrecs. If both maxrecs and exprecs are specified, the larger of the two will be used.
Comments
Although ISMBLD.SBX shares much of the same code as ISMBLD.LIT, it offers the option of allowing ISMBLD to auto-determine 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.
Unless the NOAUTOX option is specified in the system parameters, ISAM files auto-expand as needed; reccnt only affects the initial allocation, and maxrecs only affects the optimization of the idxblksiz and idxlvls parameters. Although the DAT and IDX files will expand as needed, the organization of the IDX (idxblksiz and idxlvls) will remain the same as when the file was created.
See Also
| • | ISMDMP.LIT |