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 (Note 1) | asc | 1-254 | CHARTYPE of NetCOBOL | |
Unicode UCS-2 form (Note 2)(Note 3) | 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)(Note 4) | 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 (Note 2) | ut8 | 1-254 | CHARTYPE of NetCOBOL |
NOTES
Can be specified if Input code system (-q) is other than the EBCDIC.
Can be specified if Input code system (-q) is other than the EBCDIC, and C or UTF-8 locale is defined in the LANG environment variable.
Byte order follows the specification of the environment variable BSORT_UCS2TYPE or the BSORT_UCS2TYPE of startup file.
Byte order follows the specification of the environment variable BSORT_UTF32TYPE or the BSORT_UTF32TYPE of startup file.
opt
This specifies the operation of the index field.
The operations that can be specified are shown below. When both "d" and "n" are omitted, it operates assuming that "d" is specified. Always specify "e" for the final segment.
opt | Meaning |
---|---|
a | It sorts data in ascending order. |
d | The index can have duplicate key values. |
e | It shows the end of segments. |
n | The index is a unique key. |