Reading or Writing a Name/Value Pair from or to a File

You can name a parameter based on strings that exist in the file you are parsing. When reading from a file, you can set the parameter's value equal to text that follows the desired delimiter. When writing to a file, text following the delimiter will be replaced by the parameter's value.


Before you begin: You must specify the file to read from or write to and display its content in the Parse tab of the Text Parser Editor before you map a parameter from or to a selected section of the file.
See Also
About the General Text Parser Adapter
  1. Display the content of the file to parse, as described in Specifying the File to Parse.
  2. From the display area on the left side of the Text Parser Editor, select the text from which name/value pairs will be created.

    Important: You must select at least one entire line of text, and the portion that defines the parameter name must follow the naming rules defined in Parameter Names.

    Tips: You can create a marker indicating the relative position of the mapping in the text file, as described in Defining a Marker. You can also click , , and to help you locate the text to select.

    A context toolbar with several options appears. You can move the toolbar if needed by clicking near its edge and dragging it.
  3. From the list of icons at the center of the dialog box, click .
    Automation Process Composer displays the Name/Value Delimiter dialog box with the default delimiter selected. The names of the parameters that would be created are highlighted in red. The corresponding values (for read operations) or text to be replaced (for write operations) are highlighted in green.
  4. Select the delimiter that results in the desired parameter names and values.
  5. To configure the range of characters that will form the parameter value for read operations, or that will be replaced during write operations, select either of the following:
    OptionDescription
    Char-range Select all characters to the right of the delimiter, including tabs and spaces.
    Word Ignore leading tabs and spaces.
  6. To configure the behavior when a duplicate parameter name is encountered, select either of the following:
    OptionDescription
    Use first Ignore duplicate parameter names.
    Stop mapping Ignore all the text after the first duplicate parameter name is encountered.
  7. When you are satisfied that the desired parameters will be created, click Read or Write, depending on the operation you selected when specifying the file to parse.
    The parameter table displays the name, type, and for read operations only, the value of the new parameters.
  8. Optional: If desired, you can delete parameters or mappings using any of the following methods:
    1. Select a parameter and click from above the parameter list to remove the parameter along with its mapping.
    2. Click anywhere within the highlighted text related to the mapping. From the context toolbar that appears, click to remove only the mapping.
    3. Select a parameter and click from the icon list in the center of the dialog box to remove only the mapping.
  9. Click Ok to save your changes and to close the Text Parser Editor.