Configuring a While Loop Using Markers

You can use markers to find and read/write every occurrence of a block of text in a file.

The Data Exchanger component uses a While loop similar to the following:

M = t.mark("Table");

while (m.matched(){

t.word(m.line(2),3).read(x[m.index()]);

m.next();

}

  1. Double-click the Data Exchanger component icon .

    The Data Exchanger Component Editor appears.

  2. From the Data Exchanger Component Editor, create the marker in the data source. For more information, see Defining Markers.

  3. Insert a While loop with the condition m.matched(), where m is the Java variable assigned to the marker.

  4. Select the word to read in the block, and assign it to the element of an array parameter.

  5. Edit the statement, and change the index of the array to m.index().

  6. Insert the Java statement m.next(); to advance to the next block.

  7. Click OK to save your changes and to close the Data Exchanger Component Editor.