Field properties

When a field is selected in the Schema Layout tab or a field type is selected in the Type Library tab, the following properties sections display in the pane:
  • Basic Properties
  • Padding and Trimming
  • Delimiters
  • Positional Properties

Basic Properties

The Basic Properties of a field are defined in the following table:

Property Description
Name Specifies the name of this field.
Attention: The field name must be a valid node name.
Type Optional: Specifies the field type used as a basis for the field. The Type list is only active if a field type has been created.
Attention: Selecting a new type might reset some of the existing properties of the field with the new settings.
Reset Resets properties that have been set locally for this field to the values for the selected type.
Type Specifies one of the following data types for the field:
  • string -  text in the specified encoding
  • boolean - true or false
  • integer - any whole number
  • numeric- any decimal number
Occurrences Optional For delimited data, this check box specifies that both the field and its delimiter can be omitted from the data. For positional data there is no delimiter so just the field is just omitted. If the field can be empty but the delimiter must be present, then the field is considered required and this check box should not be selected.
Attention: When specifying the optional property for a field, be careful not to create an ambiguous grammar for the Flat File Schema.  For more information, see Specifying Optional Fields and Records.
Repeat Minimum Specifies the minimum number occurrences of the field.
Repeat Maximum Controls repetitions of this single field. Select one of the following options:
  • Unbounded - Specifies this field can repeat any number of times
  • Range - Specify the maximum number of repetitions for this field. The actual occurrences of the field can be less than or equal to this number.
Note: Multiple occurrences are only allowed when the parent node has specified a repeat delimiter.

Padding and Trimming

Whether data is trimmed or padded depends on the following conditions:
  • In the Read Flat File activity, when converting Flat File data to XML data, the characters of the Flat File field are trimmed before being placed into the corresponding XML field.
  • In the Write Flat File activity, when converting XML data to Flat File Data, the characters of the XML element are padded before being placed into the corresponding Flat File field.

The Padding and Trimming properties of a field are defined in the following table:

Property Description
Pad/Trim Character Specifies the single character used to pad the length of, or to trim from a field.
In the Character text field of the pane, enter a single character using one of the following actions:
  • Type in the character.
  • Type if the Unicode value. For example, enter /u0020 for the space character.
  • Click [...] to browse for a character. The Character Selection dialog box opens listing the valid character choices for delimiters. In the Display column, the character or a mnemonic representing the character is displayed. In addition, the corresponding hexadecimal value and Unicode code point for the character is displayed. Select a character and click OK.  If the selected character does not have a visual symbol, a mnemonic or the Unicode value might show for this character. For more information about any of these characters, see the Basic Latin and Latin-1 Supplement character sets at: http://www.unicode.org/charts/
Pad to Length Specifies the final length of data for the field when converting XML data to Flat File Data in the Write Flat File activity. The specified padding characters are added to the data for the field up to this length. Typically the size of the padding is the same as the field.
Note: This value specified in this field is not used while trimming Flat File data to XML data in the Read Flat File activity.
Justification Specifies how what side of the field is padded or trimmed:
  • Left - When the Left option is specified, the action that occurs depends on if the field is read or written:
    • Read Flat File activity - When the field is read, the specified trim characters are trimmed from the end of the field. For example, if the trim character is equal to a hyphen character, the Field Length is equal to 10,  and the Flat File input field is equal to ---1234---. The result is the following XML element: <element>---1234</element>.
    • Write Flat File activity - When the field is written, the padding is added after the field data. For example, if the pad character is equal to a hyphen character, the Pad to Length is equal to 10,  and the input XML element is equal to <element>1234</element>,, the result is the following Flat File field: 1234------.
 
  • Right - When the Right option is specified, the action that occurs depends on if the field is being read or written:
    • Read Flat File activity - When the field is read, padding characters are trimmed from the beginning of the field. For example, if the trim character is equal to a hyphen character, the Field Length is equal to 10,  and the Flat File input field is equal to ---1234---. The result is the following XML element: <element>1234---</element>.
    • Write Flat File activity - When the field is written, padding is added before the field data. For example, if the pad character is equal to a hyphen character, the Pad to Length is equal to 10,  and the input XML element is equal to <element>1234</element>, the result is the following Flat File field: ------1234.  

Delimiters

The Escape and Encapsulation Delimiters of a field are defined in the following table. These properties are only used if the parent record has the Delimited option selected for Structure property.

Property Description
Escape Character Specifies the single character used to escape delimiters within the data of the field. During run time, the Integration Appliance parses the character directly after this delimiter as a character, not as a delimiter.
In the Character text field of the pane, enter a single character using one of the following actions:
  • Type in the character.
  • Type in the Unicode value of the character. For example, enter /u0020 for the space character.
  • Click [...] to browse for a character. The Character Selection dialog box opens listing the valid character choices for delimiters. In the Display column, the character or a mnemonic representing the character is displayed. In addition, the corresponding hexadecimal value and Unicode code point for the character is displayed. Select a character and click OK.  If the selected character does not have a visual symbol, a mnemonic or the Unicode value might show for this character. For more information about any of these characters, see the Basic Latin and Latin-1 Supplement character sets at:  http://www.unicode.org/charts/
 

For example, how is the following record parsed when no escape character is defined and the delimiter of the record is a colon?

135:Caving: What You Really Need to Know:10

The preceding  record would be parsed into the following 4 fields:
  • 135
  • Caving
  • What You Really Need to Know
  • 10
If you do not want the Caving What You Really Need to Know title broken up into two fields, you can specify an escape character of backslash and preface the colon with a backslash character as shown in the following record:

135:Caving/: What You Really Need to Know:10

When this Flat File record is parsed with the escape character before the colon, the title is not broken up into two sections even though the record uses the colon as a delimiter.

Dynamic Position Specifies the character position, starting from 1, where the escape character is defined in the first record.  The escape character is determined at run time using the character found at the specified character position. For example, how is the following record parsed when no encapsulation character is defined and the delimiter of the record is a colon?

135:Caving: What You Really Need to Know:10

The preceding  record would be parsed into the following 4 fields:
  • 135
  • Caving
  • What You Really Need to Know
  • 10
If you do not want the Caving What You Really Need to Know title broken up into two fields, you can specify a Dynamic Position of 11 and add a backslash character before the colon as shown in the following record:

135:Caving/: What You Really Need to Know:10

The escape character is now equal to the 11th character in the record: the backslash character. When this Flat File record is now parsed with the escape character is equal to the backslash character, the colon after Caving does not break this field into two sections even though the record uses the colon as a delimiter.

Write Default Specifies the escape character to use when writing this field as Flat File data. Write Default is only used in the Write Flat File activity when converting XML data to Flat File data. Write Default is not used when converting Flat File data to XML data in the Read Flat File activity.  
In the Write Default text field of the pane, enter a single character using one of the following actions:
  • Type in the character.
  • Type in the Unicode value of the character. For example, enter /u0020 for the space character.
  • Click [...] to browse for a character. The Character Selection dialog box opens listing the valid character choices for delimiters. In the Display column, the character or a mnemonic representing the character is displayed. In addition, the corresponding hexadecimal value and Unicode code point for the character is displayed. Select a character and click OK.  If the selected character does not have a visual symbol, a mnemonic or the Unicode value might show for this character. For more information about any of these characters, see the Basic Latin and Latin-1 Supplement character sets at:  http://www.unicode.org/charts/

For example, you wanted to escape the colon with a backslash in the <title>Caving: What You Really Need to Know</title>. XML element, when converting it to Flat File data, specify a backslash in the Write Default field.  The run-time result for this field is the following string:

Caving\: What You Need to Know

The character position specified in the Dynamic Position field is not used when an XML element is converted to Flat File data.

Encapsulation Character Specifies a delimiter character to encapsulate data in the field because the field could contain character(s) that are being used to delimit this field in the parent record.
In the Character text field of the pane, enter a single character using one of the following actions:
  • Type in the character.
  • Type in the Unicode value of the character. For example, enter /u0020 for the space character.
  • Click [...] to browse for a character. The Character Selection dialog box opens listing the valid character choices for delimiters. In the Display column, the character or a mnemonic representing the character is displayed. In addition, the corresponding hexadecimal value and Unicode code point for the character is displayed. Select a character and click OK.  If the selected character does not have a visual symbol, a mnemonic or the Unicode value might show for this character. For more information about any of these characters, see the Basic Latin and Latin-1 Supplement character sets at:  http://www.unicode.org/charts/
 

For example, how is the following record parsed when no encapsulation character is defined and the delimiter of the record is a colon?

135:Caving: What You Really Need to Know:10

The preceding  record would be parsed into the following 4 fields
  • 135
  • Caving
  • What You Really Need to Know
  • 10
If you do not want the Caving What You Really Need to Know title broken up into two fields, you can specify the encapsulation character to be a double quotation mark and surround the book title with double quotation marks as shown in the following record:

135:"Caving: What You Really Need to Know":10

When this Flat File record is now parsed with the encapsulation character set to double quotation marks, the colon after Caving does not break this field into two sections even though the parent record uses the colon as a delimiter. The Integration Appliance reads all the characters between two encapsulation delimiters as characters rather than delimiters.

Dynamic Position Specifies the character position, starting from 1, where the delimiter is defined in the first record.  The encapsulation delimiter is determined at run time using the character found at the specified character position

For example, how is the following record parsed when no encapsulation character is defined and the delimiter of the record is a colon?

135:Caving: What You Really Need to Know:10

The preceding  record would be parsed into the following 4 fields:
  • 135
  • Caving
  • What You Really Need to Know
  • 10
If you do not want the Caving What You Really Need to Know title broken up into two fields, you can specify the Dynamic Position of 5 and surround the book title with double quotation marks and as shown in the following record:

135:"Caving: What You Really Need to Know":10

The encapsulation character is equal to the 5th character in the record: the double quotation mark character. When this Flat File record is now parsed with the encapsulation character is equal to the double quotation mark character, the colon after Caving does not break this field into two sections even though the record uses the colon as a delimiter. The Integration Appliance reads all the characters between two encapsulation delimiters as characters and not delimiters.

Write Default Specifies the encapsulation character to use when writing this field as Flat File data. Write Default is only used in the Write Flat File activity when converting XML data to Flat File data. The Write Default is not used when converting Flat File data to XML data in the Read Flat File activity.
In the Write Default text field of the pane, enter a single character using one of the following actions:
  • Type in the character.
  • Type in the Unicode value of the character. For example, enter /u0020 for the space character.
  • Click [...] to browse for a character. The Character Selection dialog box opens listing the valid character choices for delimiters. In the Display column, the character or a mnemonic representing the character is displayed. In addition, the corresponding hexadecimal value and Unicode code point for the character is displayed. Select a character and click OK.  If the selected character does not have a visual symbol, a mnemonic or the Unicode value might show for this character. For more information about any of these characters, see the Basic Latin and Latin-1 Supplement character sets at:  http://www.unicode.org/charts/.
 

For example, you wanted to encapsulate the data found in the <title>Caving: What You Really Need to Know</title> XML element with quotation marks when converting it to Flat File data, specify the double quotation marks in the Write Default field. The runtime result for this field is the following string:

"Caving: What You Need to Know"

The character position specified in the Dynamic Position field is not used when an XML element is converted to Flat File data.

Positional Properties

The Positional Properties of a field are defined in the following table. These properties are only active if the parent record has the Positional option selected for Structure property.

Field Description
Field Offset Specifies the number of characters to skip, starting from the end of the previous field, to reach the beginning of this field.
Field Length Specifies the length of the data for this field.



Feedback | Notices


Timestamp icon Last updated: Tuesday, 27 September 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/ref_field_properties.html