2018.2

Table Of Contents
Name Description
openBinaryReader()
Opens a file as a binary file for reading purposes.
openBinaryWriter()
Opens a file as a binary file for writing purposes.
openTextReader()
Opens a file as a text file for reading purposes.
openTextWriter()
Opens a file as a text file for writing purposes.
Using scripts in the DataMapper
In the DataMapper every part of the extraction process can be customized using scripts.
A script can be used to set boundaries for a data source (see "Setting boundaries using
JavaScript" on page323). The script determines where a new record starts.
Scripts can also be used in different steps in the extraction workflow. You can:
l Modify the incoming data prior to executing the rest of the extraction workflow, via a
Preprocessor (see "Preprocessor step" on page202).
l
Edit extracted data in a field of the Data Model using a Post function script (entered on
the Step properties pane, under Field Definition; see "Modifying extracted data" on
page222 and "Settings for location-based fields in a Text file" on page287).
l
Enter a script in a JavaScript-based field (see "JavaScript-based field" on page218).
Note that the last value attribution to a variable is the one used as the result of the
expression. It is possible to refer to previously extracted fields if they are extracted higher
in this list or in previous Extract steps in the extraction workflow.
l
Let an Action step run a JavaScript, or use JavaScript to add a value to a property
defined in the Preprocessor step.
l
Change the left and right operands in a Condition step to a JavaScript expression. (On
the Step properties pane, under Condition, set Based on to JavaScript; see "Condition
step properties" on page304 and "Left operand, Right operand" on page307.)
l Further process the resulting record set after the entire extraction workflow has been
executed, via a Postprocessor (see "Postprocessor step" on page212).
Page 321