Top
PowerBSORT V7.0 User's Guide
FUJITSU Software

5.3.23 KeyCmdStr property

This property sets key fields for the sort processing and merge processing.

Syntax

object.KeyCmdStr = string

object

This specifies object expressions that define references to objects.

string

This specifies the key field according to the format.

Format of string

pos.len typ opt [, pos.len typ opt ...]

pos

This specifies positions of the key fields. It is calculated making the head of the record to be 0. When text files are input, a floating field or fixed field is specified according to the value of the FieldDefinition property. For files other than the text file, the fixed field should be always specified. For the floating field, field number should be specified and a column position should be specified for the fixed field.

len

This specifies the length of the key field after period (.). In some data formats, the length that can be specified is limited. For more information, refer to the 1.6.4.1 Data formats that can be specified in the key field. When the data is processed in the text file as the floating field, the data is processed in the specified field length if a longer field than the specified field length appears. On the contrary, when a shorter field than the specified field length appears, the data is processed in the actual field length.

When unsigned binary numbers (bit) are specified for data format typ, specify the mask values in decimal numbers in the range from 1 to 255. In this case, the logical product of the field value and the mask value becomes the key value. For instance, when 8e in hexadecimal number is specified for the field value and 3 is specified for the mask value, the key value is 02 in hexadecimal number.

typ

This specifies the data format of the key field after len. For more information, refer to the 1.6.4.1 Data formats that can be specified in the key field.

opt

This specifies the operations of the key field after typ. For more information, refer to the opt.

Description

Example

  1. The following description specifies to sort the field of ASCII codes in 10 bytes from the head of the record in ascending order.

    0.10asca
  2. The following description specifies to sort the field of ASCII code in 5 bytes from the head of the record in descending order and the external decimal number in 1 byte from the 20th byte in ascending order.

    0.5ascr,19.1zdla