Configuring a Read Operation

You can control how the text parser reads parameter values from a file.


Before you begin: You can edit and configure a mapping as you create it, or afterwards. You must at least select text from the content in the Parse tab of the Text Parser Editor before you can view and modify the configuration options described here.
  1. Create a mapping or select text in preparation for creating a mapping, as described in any of the following sections:

  2. If you have already created a parameter and mapped it, do one of the following:
    • Select the parameter from the list and, from the icon list in the center of the dialog, click .
    • In the display area on the left side of the Text Parser Editor, click anywhere within the desired parameter's highlighted text, and from the context toolbar that appears, select .

    Tip: If you have created a large number of parameters, you can click Filters to reduce the number of parameters displayed. You can filter the parameters by Name, Mode, or Type.

    A dialog containing editing and configuration options appears.
  3. Required: Enter a new name for the parameter, or click and either select from the list of existing array parameters or use to create a new one.

    Note: If the original parameter already exists and is mapped, but the new parameter does not yet exist, Optimization Process Composer will create a parameter and transfer the mapping to it. The original parameter continues to exist.

  4. Select Initialize parameter values to use the selected text as the initial value of the parameter. If you do not choose to initialize, a value of zero will be used.
  5. For array parameters, if the array dimensions are not automatically calculated, you can enter the Array size and number of Rows to Read. The number of rows to read must be smaller than the array size value.
  6. For resizable arrays, type the number of Rows to Skip, and select either:
    OptionDescription
    From Top To skip rows beginning at the top of your selection; for example, to skip heading rows
    From BottomTo skip rows at the end of your selection; for example, to skip rows containing totals
  7. Enter the Failed Parser Value. Optimization Process Composer uses this value if the parse fails, which may happen if, for example, an invalid character is encountered while parsing. If you do not enter a value and the parse fails, Optimization Process Composer does not assign a value to the element of the parameter.
  8. Modify the parse. Based on the text you select and the type of parameter you are creating, Optimization Process Composer automatically chooses the best type of parse and presents appropriate values for you to modify. For scalar and 1D arrays, you can also change the type of parse that will be used.

    Char-range
    Parse character by character. You can specify the character range to capture on each line.
    Word or Columns
    Parse word by word, where words are defined by a set of word separator characters. The term Column, rather than Word, is used in the case of 2D Arrays. You can modify the separators as described in Specifying Word Separator Preferences, and you can specify which word to capture on each line.

  9. Click Read.