Top
PowerBSORT V7.0 User's Guide
FUJITSU Software

5.3.32 SelCmdStr property

This property sets the selection fields of the sort processing, the merge processing and copy processing.

Syntax

object.SelCmdStr = string

object

This specifies object expressions that define references to objects.

string

This specifies selection fields.

Format

pos.len typ opt.cmp. { pos.len typ | slf }
    [{ AND | OR } pos.len typ opt.cmp. { pos.len typ | slf } ...]

pos

This specifies positions of the selection field. The data is calculated making the head of the record to be 0. When the input is based on text file, floating field or fixed field is specified in a according to the values specified in the FieldDefinition property. In the case that the input is other than the text file, the fixed field is specified always. Specify the field number for the floating field and column positions for the fixed field.

len

This specifies the length of the selection field after period (.). In some data formats, the length that can be specified is limited. For more information, refer to the 1.6.4.3 Data formats that can be specified in the selection 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 is 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. The same mask value is specified for the compared field and comparing field.

typ

This specifies the data format of the selection field after len. For more information, refer to the Data formats that can be specified in the compared field and comparing field.

opt

This specifies the operations of the selection field. This specification is valid for text files. The options that can be specified are as follows.

Operation

Meaning

b

Blank and tab in the head of the key field are ignored.

d

Only blanks and alphanumeric character are to be compared.

i

Control character codes are ignored.

j

Lowercase letters are compared as uppercase letters.

n

Character strings of numbers that contains signs are compared in arithmetic values. The result in the case that characters other than numbers are in the character strings might not be secured.

cmp

This specifies comparison operator.
Set period ( . ) before and after cmp and describe it after that without putting any blanks.

Comparison operator

Meaning (True conditions)

eq

Compared field = Comparing field or literal value

ne

Compared field != Comparing field or literal value

gt

Compared field > Comparing field or literal value

ge

Compared field >= Comparing field or literal value

lt

Compared field < Comparing field or literal value

le

Compared field <= Comparing field or literal value

slf

This specifies literal values. The following 3 formats can be specified. However, decimal numbers cannot be specified for text files. Also, the formats that can be specified depend on the data formats of the compared field. For more information, refer to the Combinations of data formats that can be specified in the compared field and literal value.

Format

Specifying method

Character string

'Character string'

Enclose the character strings with quotation marks (').
Example) '123'

Hexadecimal number

xHexadecimal number

Put x in the head and proceed with hexadecimal numbers.
Example) x313233

Decimal number

dDecimal number

Put d in the head and proceed with decimal numbers. Also, the signs (+, -) can be put.
Example) d123, d+123, d-123

AND | OR

This specifies logical relationship to specify 2 or more selection fields. In the selection fields united with AND, the records that meet both selection condition are to be processed. In the selection fields united with OR, the records that meet either one selection condition are to be processed.
As for the priority level of AND and OR, AND is higher, and AND is firstly evaluated. If a AND b OR c is specified, the record that meets the conditions of a and b at the same time or the record that meets the condition of c is selected. Parentheses cannot be used in the selection field. Specify a AND b OR a AND c for the logical expression like a AND (b OR c).

Description

Example

  1. ASCII codes in 10 bytes from the 20th bytes and ASCII codes in 10 bytes from 30th bytes of the input record are compared. If they are equal, they are processed.

    19.10asc.eq.29.10asc
  2. ASCII code in 4 bytes from the 20th byte of the input record is compared to the character string 'abcd' of ASCII code and if they are not equal, they are to be processed.

    19.4asc.ne.'abcd'
  3. The field of the fixed-point binary number in 4 bytes from 12th byte in the input record is to process the records in decimal number of 30 or more.

    11.4fbi.ge.d30
  4. The record whose field of the packed decimal number in 10 bytes from the 20th byte is smaller than the decimal number 123 and the record whose field of the external decimal number in 4 bytes from the 50th byte of the input record is bigger than the decimal number -123 are to be processed.

    19.10pdl.lt.d123 AND 49.4zdl.gt.d-123