The BSIDXKEY structure is a structure to specify the index field when output file is the NetCOBOL indexed file.
typedef struct { unsigned long idx_position; unsigned long idx_length; unsigned char idx_type; unsigned char idx_order; unsigned char idx_msub; unsigned char idx_comp; } BSIDXKEY;
BSIDXKEY structure member
In the following, it explains about the member of the BSIDXKEY structure.
idx_position
This specifies the position of the index field in a byte position.
idx_length
This specifies the length of the index field in byte.
idx_type
This specifies the data format of the index field.
The data formats and the lengths of the index field are shown as follows.
Type | Data format | Define value | Length (byte) | Meaning | |
---|---|---|---|---|---|
Character | ASCII code | BSKEY_ASC | 1-254 | CHARTYPE of NetCOBOL | |
Unicode UCS-2 form | BSKEY_UCS2 | 2-254 | CHARTYPE of NetCOBOL | ||
Big endian | BSKEY_UCS2B | 2-254 | CHARTYPE of NetCOBOL | ||
Little endian | BSKEY_UCS2L | 2-254 | CHARTYPE of NetCOBOL | ||
Unicode UTF-32 form | BSKEY_UTF32 | 4-252 | CHARTYPE of NetCOBOL | ||
Big endian | BSKEY_UTF32B | 4-252 | CHARTYPE of NetCOBOL | ||
Little endian | BSKEY_UTF32L | 4-252 | CHARTYPE of NetCOBOL | ||
Unicode UTF-8 form | BSKEY_UTF8 | 1-254 | CHARTYPE of NetCOBOL |
idx_order
This specifies sorting order of index field.
The ascending order is specified for the NetCOBOL indexed file.
Define value | Sorting order |
---|---|
BS_ASCND | Ascending order |
idx_msub
This specifies method for creating index fields.
Specify the following according to the necessity. Specify BS_ISEGEND at the end of a main-key and the sub-key.
Define value | Meaning |
---|---|
BSIF_DUPS | This shows duplicate key specification is set in index. |
BS_IMAIN | This shows main-key is specified. |
BS_ISUB | This shows sub-key is specified. |
BS_ISEGEND | This shows end of the main-key and the sub-key. |
idx_comp
This is an unsupported member.
Set '\0' for this version.