Working with Simple Text Documents

From Jitterwiki

Jump to: navigation, search

Simple text documents contain a single segment. They can either be based upon a delimited structure (such as commas or tabs), or they can use fixed-length fields. Choose the option that is appropriate for your text document:

Contents

Your simple text document is character-delimited

Follow these steps to define a character-delimited simple text document:

Define the Document Type

  1. Enter an appropriate name for your new document definition in the Name field.
  2. Choose the Simple Text Document radio button in the Select Document Type region.
  3. Choose the Character Delimited radio button in the Select Document Format region.
  4. Click the Create button to continue.

Define the Fields

The next screen is used to define each field in your document.

  1. Type in the character (such as a comma) that will be used as the text file’s delimiter.
    (Optional) Enter an appropriate character (such as a double-quote) in the Text Qualifier field. (If you need to, you can also enter a numeric qualifier into the Number Qualifier field.)
  2. Click the New button to define the document’s first field.
  3. Enter a name in the Field Name field.
  4. Select the appropriate data type for this field from the Type dropdown menu.
    (Optional) If you want this field to have a default value, enter the value into the Default field.
    (Optional) If you want this field to have a specific format , enter the format into the Format field.
    (Optional) Repeat the previous steps for each additional data field you need to define.
  5. Click the Save button to save your work.

Your simple text document uses fixed-length fields

Follow these steps to define a fixed-length simple text document:

Define the Document Type

  1. Enter an appropriate name for your new document definition in the Name field.
  2. Choose the Simple Text Document radio button in the Select Document Type region.
  3. Choose the Fixed Field Widths radio button in the Select Document Format region.
  4. Click the Create button to continue.

Define the Fields

The next screen is used to define each field in your document.

  1. Click the New button to define the document’s first field.
  2. Enter a name in the FieldName field.
  3. Select the appropriate data type for this field from the Type dropdown menu.
  4. Enter the starting character position ( 1 is considered to be the for the beginning of the file) within the Begin field. (The default value will always be the next character after the previous field's ending position.)
  5. Note: Fixed-length text files always specify a certain number of characters that are reserved for each field. For example, you may identify a field called LastName that always has 30 characters reserved for it. (If the actual value is Smith, only 5 characters are used; the remaining characters have nothing in them.)

  6. Enter the number of characters that are reserved for this field into the Length field.
  7. (Optional) If you want this field to have a default value, enter the value into the Default field. (Optional) If you want this field to have a specific format, enter the format into the Format field. (Optional) Repeat the previous steps for each additional data field you need to define. (Optional) If you have changed any field’s character length value, press the Calculate button to recalculate all the fields’ starting positions.

    Warning! The Calculate button resets all the document definition’s Begin and End field values, based on the Length values you specified. Do not use this button if your file’s field positions have gaps or overlaps, as they will be deleted.

  8. Click the Save button to save your work.