The BSIDX structure is a structure to create the index when the output file is NetCOBOL indexed file.
The size of the area when the area of BSIDX structure is secured can be calculated by using BS_IDXTABSIZE(n). BS_IDXTABSIZE(n) is a macro to calculate the size of BSIDX structure with n pieces of index information.
typedef struct { unsigned char idx_flag; unsigned char reserve[3]; /* reserved */ unsigned long entry_no; BSIDXKEY idx_entry[1]; } BSIDX;
BSIDX structure member
In the following, it explains about the member of the BSIDX structure.
idx_flag
This specifies the method for creating indexes.
Specify the following. When selecting two or more values specify the logical sum.
Define value | Meaning |
---|---|
BSIF_COMP | The index is a compressed key. |
BSIF_CMPR | The record is a compressed data. |
entry_no
This specifies number of indexes (BSIDXKEY structure).
The maximum value complies with the maximum value of the COBOL file system.
idx_entry[n]
This specifies the index field.
For more information, refer to BSIDXKEY structure.