Top
PowerBSORT V7.0 User's Guide
FUJITSU Software

3.2.26 COBOL file index specification option (-X)

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.

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
(Multiples of 2)

CHARTYPE of NetCOBOL

Big endian

u2b

2-254
(Multiples of 2)

CHARTYPE of NetCOBOL

Little endian

u2l

2-254
(Multiples of 2)

CHARTYPE of NetCOBOL

Unicode UTF-32 form (Note 2)(Note 4)

u32

4-252
(Multiples of 4)

CHARTYPE of NetCOBOL

Big endian

u3b

4-252
(Multiples of 4)

CHARTYPE of NetCOBOL

Little endian

u3l

4-252
(Multiples of 4)

CHARTYPE of NetCOBOL

Unicode UTF-8 form (Note 2)

ut8

1-254

CHARTYPE of NetCOBOL

NOTES

  1. Can be specified if Input code system (-q) is other than the EBCDIC.

  2. 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.

  3. Byte order follows the specification of the environment variable BSORT_UCS2TYPE or the BSORT_UCS2TYPE of startup file.

  4. 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.
It is in an exclusive relation with "n".

e

It shows the end of segments.

n

The index is a unique key.
It is in an exclusive relation with "d".