Top
PowerBSORT V7.0 User's Guide
FUJITSU Software

1.6.2 Specifying fields

Both fixed fields and floating fields can be specified.

Specifying fixed fields

Specifying fixed fields is a method for specifying a field by byte position from the start of the record. The position of the field is common in all records.

Specifying floating fields

Specifying floating fields is a method for specifying fields delimited by field separation characters. Floating fields are valid in text files only. Since a position of a field depends on the position of the field separation characters, the position of the field may be different in each record.
In the text file floating field specification, there are three forms:

Note

  • Text file floating field specification:

    • Double quotation marks (") at the beginning of the field are not treated as double quotation marks (") that enclose the field.

    • The key field, the summation field, the selection field, and the reconstruction field cannot contain the field separation character and the record separator.

    • When specifying field separation characters are omitted, blanks and tabs are used as the default field separation characters. When specifying field separation characters are omitted and blanks are consecutive, the first blank is the field separation character and PowerBSORT considers the remaining blanks to be part of the field.

      Example 1: When blanks are consecutive (the specification of the field separation character is omitted).
      field1___field2_field3
      
        The second field is "__field2".  "_" means blank.
    • When a field separation character is specified, PowerBSORT processes it considering that a null field exists if the field separation characters are consecutive.

      Example 2: When the second field is a null field (";" is specified for a field separation character).
      field1;;field3
    • The self-defined value cannot contain the field separation character and the record separator.

  • Text file CSV format:

    • When the record separator and the field separation character (comma) are included in a field enclosed with double quotations ("), the field is treated as data.

      Example 1:
      field1,"field2",field3
      
        The second field is "field2".
      Example 2:
      field1,"field2"data,field3
      
        The second field is "field2data".
      Example 3:
      field1,"field2,field2",field3
      
        The second field is "field2,field2".
    • Double quotation marks (") in a field enclosed with double quotation marks (") are treated as two consecutive double quotation marks.

      Example 4:
      field1,"field2""field2",field3
      
        The second field is "field2"field2".
    • When the field separation character (comma) is consecutive, it is considered that the null field exists.

      Example 5:
      field1,,field3
      
        The second field is a null field.
    • The field consisting only of two double quotation marks (") is treated as a null field.

      Example 6:
      field1,"",field3
      
        The second field is a null field.
    • If a field separation character (comma), a record separator, and double quotation marks (") are specified by the self-defined value, it is treated as a data field.

      Example 7:
      self-defined value : self,char
      
      Actual data : "self,char"
      Example 8:
      self-defined value : self"char
      
      Actual data : "self""char"
  • Text file TSV format (see the text file CSV format for examples) :

    • When the record separator and the field separation character (tab) are included in the field enclosed with double quotation marks ("), the field is treated as data.

    • Double quotations marks (") in a field enclosed with double quotation marks (") is treated as two consecutive double quotation marks.

    • When the field separation character (tab) is consecutive, it is considered that the null field exists.

    • The field consisting only of two double quotation marks (") is treated as a null field.

    • If a field separation character (tab), a record separator, and double quotation marks (") are specified by the self-defined value, it is treated as a data field.