Table of Contents

Search

  1. Preface
  2. Introduction
  3. Dashboard
  4. Resources
  5. Workflows
  6. Task Reference
  7. Services Overview
  8. Users
  9. Logs and Reports
  10. Encryption
  11. System
  12. Appendix
  13. Glossary Terms

Managed File Transfer User Guide

Managed File Transfer User Guide

Example 1: Read Fixed-width File

Example 1: Read Fixed-width File

In the data example below, each column in the fixed-width file is separated by a space. The data in the first column represents a 5-digit employee ID followed by 1 space for a total column length of 6. The data in the next column represents an 11 character first name followed by a space, for a total column length of 12. Each record ends with a hidden CRLF delimiter. When adding these columns to the RowSet variable 'myData,' the data will be trimmed of any trailing spaces.
Follow the steps below to read the first two columns from a fixed-width file.
  1. From within the Project Designer page, expand the Data Translation folder in the Component Library, and then drag the Read Fixed-width task to the Project Outline.
  2. On the Basic tab of the Read Fixed-width task, specify values for the following attributes:
    Input File
    The file path and file name of a single file from which to read data.
    Output RowSet Variable
    The name of a variable which will contain the data read from the specified input file.
  3. On the Advanced tab of the Read Fixed-width task, specify the Skip First Row value:
    Skip First Row
    Whether or not to skip the first row of the input file. If the input file contains header information in the first row, set this value to 'true'. In the example above, there is no header information, so the setting would be set to false.
  4. Click the
    Add
    button to Specify Data Option for the Read Fixed-width task.
  5. In the Data window, click the
    Add
    button and select the
    Add Column
    option.
  6. On the Basic tab of the Column element, specify values for the following attributes:
    Index
    The index of the column in the input file. In the example above, the column used for the first Index is the Employee ID column, which is Index 1.
    Name
    Specify the name of the column.
    Size
    The size of the column. In the example above, the size is 6.
  7. On the Type Conversion tab of the Column element, specify values for the following attributes:
    Type
    The default type is Variable Character (VARCHAR). Specify a different type if needed.
    Pattern
    The pattern to use to format numeric or date/time fields.
  8. On the Data Options of the Column element, specify a value for the trim attribute:
  9. Click the
    Add
    button and choose Add Same to add another column.
  10. On the Basic tab of the Column element, specify values for the following attributes:
    Index
    The index of the column in the input file. In the example above, the column used for the second Index is the First Name column, which is Index two (2).
    Name
    Specify the name of the column.
    Size
    The size of the column. In the example above, the size is twelve (12).
  11. On the Type Conversion tab of the Column element, specify values for the following attributes:
    Type
    The default type is Variable Character (VARCHAR). Specify a different type if needed.
    Pattern
    The pattern to use to format numeric or date/time fields.
  12. On the Data Options of the Column element, specify a value for the trim attribute:
  13. Repeat steps 10-13 for each column in the file. You can also specify a column name for each field, which can be referred to in later tasks by utilizing the Name attribute.
  14. Click the
    Save
    button when finished.

0 COMMENTS

We’d like to hear from you!