Updated February 2022; see History
xcall ISMROK, ch, idaalc, idaavl{, recsiz, keysiz, keypos, devdrv, idxalc, idxavl, idanxt, idxnxt, idx'lvls, idx'blk'siz, idx'type, keyalc}
ISMROK.SBR reads the "rock" of the traditional ISAM file, returning various attributes of the file configuration and state.
Parameters
ch (Num) [in]
File channel the file is open on. Note that this is actually the index file channel (ISAM files are opened by their index; the IDA file is opened internally.) For files with multiple index (IDX) files, the IDX-related parameters below will refer to that IDX.
idaalc (Num) [out]
Number of data records allocated (in the IDA file)
idaavl (Num) [out]
Number of unused data records available
recsiz (Num) [out]
Data record size
keysiz (Num) [out]
Size of key
keypos (Num) [out]
Position of key relative to start of record (first position is 1)
devdrv (String) [out]
Device and drive number (e.g. "DSK1") for the IDA file (if not same as the IDX)
idxalc (Num) [out]
Number of IDX blocks allocated.
idxavl (Num) [out]
Number of unused IDX blocks available
idanext (Num) [out]
Next available data record number
idxavl (Num) [out]
Next available index block number
idx'lvls (Num) [out]
Number of levels in the IDX file (3-9)
idx'blk'siz (Num) [out]
Size of IDX blocks (512, 1024, 2048, 4096, 8192, ...)
idx'type (Num) [out]
bitmap indicating the index type:
Value |
Description |
&h0002 |
secondary index |
&h0800 |
A-Shell extensions; requires A-Shell version 5.1.1122 or later |
keyalc (Num) [out]
Number of keys allocated in the IDX file. In a typical file, this should match idaalc—i.e. one key per data record.
See Also
• ISMDMP.LIT
• ISMPAR.SB in SOSLIB:[907,22]
History
2022 February, A-Shell 6.5.1711: ISAM 1.X enhancement: IDX rock now contains a count of the keys allocated (additions minus deletions) along with the records allocated. This may be useful as a quick way to compare the number of keys with the number of records. Typically these should be the same, except in cases where the application deliberately adds more or less than one key to the IDX per record. Note that the keys allocated value will only be valid for files that have been rebuilt under A-Shell 6.5.1711+.
2022 February, A-Shell 6.5.1711: Add optional argument keyalc to return the new keys allocated value.
2008 August, A-Shell 5.1.1122: A-Shell's ISAM underwent some major surgery for improved ISAM Performance, which see for an in-depth discussion of performance issues. As part of that project, three new optional parameters were added: idx'lvls, idx'blk'siz , and idx'type.