About data emulation

An emulation specifies how to interpret a data file. It is basically the method through which PlanetPress Workflow parses and displays the data. If the emulation is set to CSV (comma separated values), for instance, commas encountered in the data will typically be considered as value separators. The way data selections are made depends on the emulation (see Data selections).

Every Workflow process has its own data emulation setting, which depends on the sample data file you choose.
A process's data emulation is only visible in the Workflow configuration tool when using the Data Selector e.g. to select a sample data file, but it is always set to one (Line Printer, by default).

A process's emulation can be changed either by choosing another sample data file (see Choosing a sample data file) or by inserting a Change Emulation task in the process.
Changing the emulation is particularly important if you want to make a data selection in a file after it has been changed to another format (see Data selections).

Even during debugging, selecting a sample data file with a different format will cause the emulation of a process to change. In order to avoid errors, change the emulation back to the format of the original input file before using the process again.

Stabilizing data

All emulations, except the database, PDF and XML emulations, let you perform operations on the data to stabilize it. The following options are available in both the Change Emulation task and The Data Selector.

Add/remove characters: Enter the number of characters to add to, or remove from, the head of the data stream, or use the spin buttons to increment or decrement the value. Positive values add characters; negative values remove characters. This is useful when one or more characters of input data precede the start of the first data page. Note that certain control characters can be problematic. For example, the NUL character (hexadecimal 00) cannot be removed from the head of the data stream, and a backspace (hexadecimal 08) can cause unpredictable behavior. The Hex Viewer can be useful in helping determine the control characters that appear at the head of the data stream. (To open the Hex Viewer, select Debug > View as Hex, in the menu.)
Note that you cannot add characters in a CSV. Further note that if you remove characters in a CSV emulation, you should ensure that you do not inadvertently remove field or text delimiters.

Add/remove lines: Enter the number of lines to add to, or remove from, the head of the data stream, or use the spin buttons to increment or decrement the value. Positive values add lines; negative values remove lines. This is useful when one or more lines of input data precede the start of the first data page. Note that you cannot add lines in either a CSV or user defined emulation.

Lines per page: Enter the number of lines each data page contains, or use the spin buttons to increment or decrement the value.

Pages in buffer: Enter the number of data pages you want the data page buffer to contain, or use the spin buttons to increment or decrement the value.

Read in binary mode (ASCII emulation only): Select to read the data file in binary mode. You select this if you intend to run a PlanetPress Design document on a printer queue that is set to binary mode. In binary mode, the printer reads the end of line characters (CR, LF, and CRLF) as they appear in the data stream and does not perform any substitution. A printer that does not support binary mode or is not running in binary mode replaces any CR, LF, or CRLF that appears at the end of a line of data with a LF. Note, however, that it replaces a line feed followed by a carriage return (LFCR) with two LFs. Binary mode is the recommended printer mode when you use an ASCII emulation.

Cut on FF character: Select to have a new data page when a form feed character is encountered in the data stream. If you select Cut on FF character, you have two conditions that signal the end of a data page: the form feed character and the number of lines set in the Lines per page box.

Emulation specific options

Various emulation specific options can be set for most emulations, with the exception of the line printer and database emulations. For more information about a specific emulation type, see:

Emulations in PlanetPress Design

The Data Selector in Workflow is essentially the same as the one used in PlanetPress Design. When you create a document in PlanetPress Design, you choose a sample data file and specify the emulation to use for the chosen data. Within PlanetPress Workflow, the same emulation tools as in PlanetPress Design are available throughout your process, using the Data Selector. One notable exception however is that User-Defined Emulation is not available because it uses PlanetPress Talk code, which is not available within the PlanetPress Workflow Configuration program.

The emulation that is used in your process can change during the process, and can be different than the one used in any PlanetPress Design document used in your process. PlanetPress Design Documents use their own emulations, as defined in the document itself from PlanetPress Design.

For more information about emulations in PlanetPress Design see PlanetPress Design User Guide.