Defining Target Files

Output records can be single or multiple line text. You can generate multiple lines by designating carriage returns or line feeds as UNTIL strings.

Within the Lotus® Connector for Text, you can define a character string to indicate the end of each output record. The Lotus® Connector for Text then uses this text string to delimit records. For example, whenever the Lotus® Connector for Text encounters the specific text string, it knows to end the current output record and begin another. The default record delimiter is a single new-line character (\n).

The following example depicts a sample ZID field definition for output:

(Idn): TYPE TEXT VALUE "IDN:"
Idno: TYPE TEXT START 5 UNTIL "\nNm:"
Name: TYPE TEXT UNTIL "\nTel:"
Tel:  TYPE TEXT UNTIL "\nBal:"
Balance: TYPE NUMBER.2 UNTIL "\nPmt:"
Payment: TYPE NUMBER.2 UNTIL "\nDate:"
Date: TYPE DATE FORMAT MM.DD.yy

As shown in the first four lines of the example, when you output document data you use the record delimiter to define a character to mark the end of each record. In this example, the escape sequence is a paragraph symbol indicated by the hexadecimal notation \0x14.

The UNTIL specifications are multiple character strings with a special escape sequence (\n). These allow the definition of the line feed characters that delimit the input field values and, ultimately, create our multiple line output file.

Notice, as in the input example, in the DATE field specification, the last field in the record does not have an UNTIL specification. The Lotus® Connector for Text does not require the UNTIL specification because the record delimiter is specified and the Lotus® Connector for Text places the delimiter string at the end of each output record. Also note the decimal points indicated by the NUMBER.2 options used in the ZID field description.

The ZID field description produces an output file as follows:

IDN:566238744
Nm:Carol Ann Wilson
Tel:1025557746
Bal:40000.98
Pmt:300.00
Date:10-15-93
¶
IDN:012358743
Nm:Nathan Varberg
Tel:1015552345
Bal:3000.00
Pmt:250.00
Date:10-11-93
¶
IDN:524135698
Nm:David Fein
Tel:1015553222
Bal:35599.55
Pmt:1025.50
Date:09-30-93