Plugin Adapters
Common
XML
HL7
Text
Database
Messaging
Mail
iSeries
| The Text Reader Task allows you to define the structure of a fixed-length text file that is parsed at runtime. The file can be received as an MQ Series message or as a file in a monitored directory. The task does not specify the method of arrival. A fixed-length file is a file comprised of fixed-length text fields. These fields contain data and have a specified length. If the data in the field does not completely fill in the specified length, the remaining length is padded with spaces. In order for the contents of the text file to be mappable, the definition of the text file must be described as an XML Schema. This means it must be possible to express the text file format as a tree consisting of related text file fragments.. Properties To define the definition of the text file, build the structure starting from the root node. Use the options on the right-click menu. If the definition already exists in a data dictionary file, it can be imported. |
 |
Task Properties
| Bypass validation
|
This option if selected, reads the input text contents sequentially and stops if it encounters a parse error. The Text Reader Task then returns the content it can read, without throwing an error. If not selected, an error would be thrown in the above scenario. |
| Trim trailing spaces in field data
|
This Boolean property allows you to remove the characters (spaces) that are added to pad the fixed-length fields. |
| Root node
|
When the customizer is first opened, a single root element appears. The Fixed length text file, which this task will generate, consists of a group called root with no child lines, and therefore no field descendants. Since the data in the text file that is generated by this task originates from the content of its field nodes, if you were to run a solution containing this task as it currently configured, the output file would contain no data.
Right-click, on the root node to add child nodes (Group or Line). Continue to add groups, lines and fields until you achieve the desired structure for your text file. For more information, see Creating a Node. |
| Load
|
This option allows you to import the definition of the text file by loading a data dictionary file (XML file containing the text file's definition). When the data dictionary file is chosen, you have the option to merge it with the existing structure or simply replace the current definition. |
| Save As
|
This option allows you to export the definition of the text file to a data dictionary file (XML File) to be used by other text tasks. |
Creating A Node
When you create a node, you are asked to define it using the Create Node screen. You must specify a name for the node and configure its options.
| Group node |
These fragments are repeating collections of Lines and Selectors. A group may also contain one or more sub-groups. Unlike lines or fields, a group within a fixed-length text file definition represents one or more group instances in the generated file.
Min & Max. Occurrences: When a line is added to a group definition, that line must appear once, and only once, per group instance in the generated file. Similarly, when a field is added to a line definition, that field must appear only once per line instance in the generated file. When a sub-group is added to a parent group, however, that sub-group may appear any number of times per parent group instance (with the actual number of appearances dependant on the mapping specified and the data present at runtime). If no maximum occurrence should be specified, select the No Max option.
|
| Selector node |
These fragments allow you to represent a decision; one or another of the selectors children may appear at runtime.
|
| Line node |
These fragments are a collection of fields, which should be written as a single line within the fixed-length text file. Each line contains:
Line break characters: This specifies the characters that mark the end of a line. The default is the line-feed character (ASCII/Unicode character 10). The header and trailer portions of a fixed-length text file are often written as single, distinct lines.
Distinguisher (optional): This works in conjunction with a parent Selector; a distinguisher makes it possible to figure out which of a Selector's possible children has actually been encountered during the parse at runtime.
|
| Field node |
These fragments are leaf nodes. Each filed contains one piece of text data with a user-specified maximum length and type.
Field Length: Specifies the maximum length. For example, a text field may contain a surname with a maximum length of 20 characters, or it may contain a birthdate in MMDDYYYY format with a maximum length of 8 characters.
Field Type: Specifies the format of the field data. The options are String (default value) and Numeric.
Note: Fields do not validate data before they are populated at runtime, except to truncate data, which exceeds their length.
|
Start Here
Setup
Adapters
Studio
Server
Monitor
Mapping
Scripting
Samples
Index
|