Generic Splitter

Note: This plug-in has been moved to the Legacy group.

The Generic Splitter is a legacy task which is kept for backwards compatibility. In previous versions of PReS Workflow, it was the only splitter available. While this splitter seems to have more options than the other ones, this is only because it contains combined features from these other splitters.

Caution: The Generic Splitter, while seemingly more feature-rich, is slower than the other splitters by an order of magnitude. Whenever encountering the Generic Splitter, it is always recommended to replace it with a more appropriate splitter instead.

Input

Any data file.

Processing

The file is separated into multiple chunks according to the rules set in the task's properties.

Output

Multiple data files, sent one after the other to the rest of the tasks in the process. Metadata, Job Infos and other variables are not modified by this task.

Task properties

General Tab

  • Split data file on: Use this box to choose the item on which top split the file. The options available depend on whether or not the Use emulation box is checked (see below).
  • Use emulation: Check to emulate the data before splitting the file. This lets you split the file on a word, a word change, a page number, a database field value or a database field change.
    When this option is not checked, you can only split the file on a form feed, a specific number of lines, or a chain of characters. See below for detailed information on any of these splitting methods.
    With this option unchecked, data selections are done with the File Viewer. The File Viewer is like a Data Selector (see The Data Selector) without any data related options, such as emulation settings. The only data formatting codes to which the File Viewer responds are line breaks.
  • A word: If you choose “A word” in the Split data file on list box (the Use emulation option must be selected), the following boxes are displayed:
    • Word: Enter the string of characters to search for as the splitting criteria. In this variable property box, you may enter static characters, variables, job information elements or any combination of these.
    • Get: Click to get a static string of characters from the sample data file. If you use this button, the coordinates of the data you will select will be added to the Word is between lines and Word is between columns groups below.
    • Word is between lines
      • From and To: Enter a vertical search region defined as starting from a given line and ending at a given line. If you enter 1 in the From box and 1 in the To box, the Generic Splitter will search for the string of characters entered above only in the first line of every page. If you enter 1 in the From box and 10 in the To box, the Generic Splitter will search in the ten first lines of every page. Note that the actual search region is a combination of the vertical and horizontal search regions.
    • Word is between columns
      • From and To: Enter a horizontal search region defined as starting from a given column and ending at a given column. If you enter 1 in the From box and 5 in the To box, the Generic Splitter will search for the string of characters only in the first five column (five first characters of every line selected above).
      • Consider case: Select to force the Generic Splitter to match the character casing of the string of characters entered above with the characters found in the file. If this option is selected, “DAY” and “Day” will not be considered as matching the search string “day”.
    • Where to split group
      • Pages: Enter exactly where to split the file. Enter 1 to split the file 1 page before or after the string, 2 to split the file 2 pages before or after the string, or 0 to split the file immediately before or after the string.
      • Before or after: In the previous box, you entered exactly where you wanted to split the file, here is where you specify whether you want the split before or after.
    • Split when word found: You may not want to split the file every time the string of characters entered above is found, but only every other time, or every third time. If so, enter the number of times in this box.
  • A word change: If you choose A word change in the Split data file on list box (the Use emulation option must be selected), the following boxes are displayed.
    • Get: Click to select a search region. The coordinates of the selected region will be added to the Word is in line box and the Word is between columns group below. The Generic Splitter will look for changes in the string of characters appearing in that region.
    • Word is in line: Enter the line on which to search for the word change. If you enter 1, the Generic Splitter will consider only in the first line of every page. Note that the actual search region is a combination of the vertical and horizontal search regions.
    • Word is between columns group
      • From and To: Enter a horizontal search region defined as starting from a given column and ending at a given column. If you enter 1 in the From box and 1 in the To box, the Generic Splitter will search for the string of characters entered above only in the first column of the line selected above. If you enter 1 in the From box and 10 in the To box, the Generic Splitter will search in the ten first columns of the line selected above.
      • Consider case: Select to force the Generic Splitter to consider a change in character casing as a word change. If this option is selected, “DAY” will be considered as different from “day”.
      • Trim selection: Select to force the Generic Splitter to trim empty characters at the beginning and end of the data found in the search region. If this option is not selected, “DAY” will be considered as different from “DAY”.
    • Where to split group
      • Pages: Enter exactly where to split the file. Enter 1 to split the file 1 page before or after the string, 2 to split the file 2 pages before or after the string, or 0 to split the file immediately before or after the string.
      • Before or after: In the previous box, you entered exactly where you wanted to split the file, here is where you specify whether you want the split before or after.
    • Split when word changed: You may not want to split the file every time the string of characters entered above changes, but only every other time, or every third time. If so, enter the number of times in this box.
  • A page number: If you choose A page number in the Split data file on list box (the Use emulation option must be selected), the following boxes are displayed.
    • Pages per output file: Enter a number of pages after which to split the file. If you enter 3, for example, the Generic Splitter will split the file every time it has counted three pages. A 10 page file would be split in 4 files, the first three being three pages long and the last one only 1 page long.
    • View data file: Click to view the sample data file and to cycle through the pages.
  • A database field value: If you choose A database value in the Split data file on list box (the Use emulation option must be selected), the following box is displayed.
    • Field: Enter the name of the field that the Generic Splitter must check (only alphanumeric fields can be used—selecting a binary field, for instance, will cause the job to fail). If you enter “ID”, for example, the Generic Splitter will only look in the field named “ID” for the value entered below. In this variable property box, you may enter static characters, variables, job information elements or any combination of these.
    • Operator: Select the appropriate comparison operator. If you select Equals, the Generic Splitter will only consider that the condition is met when it finds a perfect match (“day“ and “day“, for example). If you select Contains, the Generic Splitter will consider that the condition is met whenever it finds the string of characters entered in the Value box, even if the database field contains additional characters (“day“ and “days“, for example, would be considered a match).
    • Value: Enter the string of characters to search for as the splitting criteria. Like the Field box, this is also a variable property box.
    • Consider case: Select to force the Generic Splitter to match the character casing of the string of characters entered in the Value box with the characters found in the file. If this option is selected, “DAY” and “Day” will not be considered as matching the search string “day”.
    • Where to split group
      • Pages or records: Enter exactly where to split the file. Enter 1 to split the file 1 page or record before or after the string, 2 to split the file 2 pages or records before or after the string, or 0 to split the file immediately before or after the string.
      • Before or after: In the previous box, you entered where you wanted to split the file. Here is where you specify whether you want the Generic Splitter to split the file X number of pages or records before or after the string. Choose 5 in the Pages or records box and “Records after” in this box, for example, to split the file 5 records after the record that matches the condition.
    • Split when condition found: You may not want to split the file every time the string of characters entered in the Value box is found, but only every other time, or every third time. If so, enter the number of times in this box.
  • A database field change: If you choose A database field change in the Split data file on list box (the Use emulation option must be selected), the following box is displayed.
    • Field name: Enter the name of the field that the Generic Splitter must check. If you enter “ID”, for example, the Generic Splitter will only look in the field named “ID” for the value entered below. In this variable property box, you may enter static characters, variables, job information elements or any combination of these.
    • Consider case: Select to force the Generic Splitter to match the character casing of the string of the values appearing in the selected database field. If this option is selected, “DAY” and “Day” will not be considered as matching the search string “day”.
    • Where to split group
      • Pages or records: Enter exactly where to split the file. Enter 1 to split the file 1 page or record before or after the string, 2 to split the file 2 pages or records before or after the string, or 0 to split the file immediately before or after the string.
      • Before or after: In the previous box, you entered where you wanted to split the file. Here is where you specify whether you want the Generic Splitter to split the file X number of pages or records before or after the string. Choose 5 in the Pages or records box and “Records after” in this box, for example, to split the file 5 records after the record that matches the condition.
    • Split when condition found: You may not want to split the file every time the string of characters changes, but only every other time, or every third time. If so, enter the number of times in this box.

On Error Tab

For a description of the options on the On Error tab see Using the On Error tab.

Miscellaneous Tab

The Miscellaneous tab is common to all tasks.

It contains a text area (Task comments) that lets you write comments about the task. These comments are saved when the dialog is closed with the OK button and are displayed in The Task Comments Pane.

Check the option Use as step description to display the text next to the icon of the plugin in the Process area.

The tab also provides an option to highlight the task in The Process area with the default color, set in the Preferences (see Colors), or the color selected or defined under Highlight color on this tab.
To revert the selected highlight color to the default color, open this tab, turn the Highlight option off and close the dialog with the OK button; then turn highlighting back on.
Highlighting can also be turned on and off via the task's contextual menu and with the Highlight button on the View ribbon.