IP Designer Series – The Data Iterator Node

The Data Iterator node can be used to loop through records.  One way to use this node is to loop through the lines of a TXT or CSV file so that the data can be manipulated and stored somewhere else, or used in Lawson programs.  Here is an example of a process using data iterators.  The first node accesses a csv file and loops through each line.  The second iterator takes the line from the first node, and splits it on a delimiter.  From there, it loops through each field in the line and makes an assignment.

  1. The first node, which uses a file as the input
    1. Configuration name – select the configuration where the file resides (main is LSF, system is Landmark)
    2. Input file – the path to the file
    3. Parse by:
      1. Line – loop through each line
      2. Delimiter string – provide a character or string, the iterator will “split” on that string and loop through each item
      3. Length – use this for a fixed-length flat file
    4. Starting position – use this to determine which line the iterator should start on (so you could skip header rows if needed)
    5. Maximum read iterations – Use if you only want to read a certain number of lines/characters in a file
    6. Ignore trailing delimiter – will ignore the delimiter at the end of the line
    7. Accumulate output variables – Specifies whether records should be output into separate variables as they are parsed. If true (check box is selected), each record will be saved in the activity variable activityName_outputDataN, where activityName is the name of the activity and N is the record number.
  1. The second node, which uses a file as the input
    1. Configuration name – select the configuration where the file resides (main is LSF, system is Landmark)
    2. Input data – the data to read into the iterator
    3. Parse by:
      1. Line – loop through each line
      2. Delimiter string – provide a character or string, the iterator will “split” on that string and loop through each item
      3. Length – use this for a fixed-length flat file
    4. Starting position – use this to determine which character the iterator should start on
    5. Maximum read iterations – Use if you only want to read a certain number of lines/characters in a file
    6. Bytes to read – used for fixed width files
    7. Delimiter string – the string that splits each field of the record
    8. Ignore trailing delimiter – will ignore the delimiter at the end of the line
    9. Accumulate output variables – Specifies whether records should be output into separate variables as they are parsed. If true (check box is selected), each record will be saved in the activity variable activityName_outputDataN, where activityName is the name of the activity and N is the record number.