This specifies index fields in the indexed file of COBOL file system.
It cannot be omitted for the indexed file of COBOL file system.
Format
-X index-def [ ,index-def ...]
index-def
This specifies the main key first, and then the sub-key.
Format of index-def
pos.len typ opt
pos
This specifies the position of the index field in a byte position.
len
This specifies the length of the index field in byte.
typ
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 | typ | Length (byte) | Meaning | |
---|---|---|---|---|---|
Character | ASCII code | asc | 1-254 | CHARTYPE of NetCOBOL | |
Unicode UCS-2 form (Note 1) | uc2 | 2-254 | CHARTYPE of NetCOBOL | ||
Big endian | u2b | 2-254 | CHARTYPE of NetCOBOL | ||
Little endian | u2l | 2-254 | CHARTYPE of NetCOBOL | ||
Unicode UTF-32 form (Note 2) | u32 | 4-252 | CHARTYPE of NetCOBOL | ||
Big endian | u3b | 4-252 | CHARTYPE of NetCOBOL | ||
Little endian | u3l | 4-252 | CHARTYPE of NetCOBOL | ||
Unicode UTF-8 form | ut8 | 1-254 | CHARTYPE of NetCOBOL |
NOTES
Byte order follows the specification of the environment variable BSORT_UCS2TYPE.
Byte order follows the specification of the environment variable BSORT_UTF32TYPE.
opt
This specifies the operation of the index field.
The operations that can be specified are shown below. Always specify "e" for the final segment.
opt | Meaning |
---|---|
a | It sorts data in ascending order. |
d | It shows duplicate key specification in the index. |
e | It shows the end of segments. |