ISMBLD.SBX

Updated April 2013

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 5.1.1122 of August 2008 as part of the 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 compute block size

IBF_EXISTING

&h0008

process existing file (

IBF_PROGRESS1

&h0100

progress style 1 (% at cursor location)

 

status  (F,6)  [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  (String)  [in]

key position

recsiz  (String)  [in]

record size

reccnt  (String)  [in]

# recs (initial allocation)

idadev  (String)  [in]

IDA device (e.g. "DSK7:") if not same as IDX

infile  (String)  [in]

Seq file to load from, or name of main IDX if creating a secondary IDX

maxrecs  (String)  [in]

Expected max # recs (for auto-determination of optimum idxblksiz and idxlvls; 0 to ignore)

idxblksiz  (String)  [in]

IDX block size (default 512)

idxlvls  (String)  [in]

IDX levels (default 3)

extrablks  (String)  [in]

Extra IDX blocks (if omitted, use 50%). 0.05 - 1.00 = % x 100, e.g. 0.5 = add 50%)

exprecs  (String)  [in]

Expected / eventual number of records, to improve the IBF_AUTOBLKLVL (auto configure index) calculations.

Note that although ISMBLD.SBX shares much of the same code as ISMBLD.LIT, it offers the option of allowing ISMBLD to auto-determing 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.

 

See Also

•   ISMBLD.LIT

•   ISMDMP.LIT

•   ISMROK.SBR.

History

2013 April, A-Shell 6.1.1348, ISMBLD.SBX 2.1(134):  Add new parameter exprecs (see above)