Defining Page Breaks and Document Breaks

To properly process your print stream you need to indicate where one document stops and another starts. You may also define where the page breaks are within each document, or you can let Enrichment identify page breaks automatically.

A common mistake in print stream analysis is defining the top or bottom of a document somewhere other than the first or last page of the document. This mistake is especially common when the user specifies a <PAGE> tag and Enrichment does not determine pages automatically. As the following figure illustrates, the control file must meet two conditions to ensure proper document and page definition:

  • The first <PAGE> tag location (or the first automatic page break) must occur on the first record of the first document in the print stream.
  • The <DOCUMENT> tag location that identifies top-of-document must occur before the condition that causes page 2 (that is, it must occur on page 1). If you are defining bottom-of-document, the <DOCUMENT> tag location must occur on the last page of the document.

Defining Page Breaks

Enrichment can automatically identify pages in most types of print streams (that is, it can identify pages without using tags). It does so by looking for an ANSI carriage control of 1 or a machine carriage control of X8B or X89 in column 1.

Note: You must use a Field group <REFERENCE> tag to locate any field used to specify top-of-page since it cannot be located from the top of the page (because the page is not yet defined).

If you do not want Enrichment to automatically determine page breaks in your print stream (for example, if you have multiple logical pages all of which use carriage control 1 in column 1 on one physical page), you must use a <PAGE> tag to identify top-of-page. For more information, see the Enrichment Language Reference.

Defining Document Breaks

An input can contain one or more documents. A document is a group of pages to be sent to the same customer or destination. Enrichment processes the pages of a document together.

Note: Enrichment allows multiple <DOCUMENT> tags in an Input group. If an input contains multiple types of documents, you can specify multiple <DOCUMENT> tags to locate each document type.

If your inputs contain more than one document, you must identify some criterion by which Enrichment will recognize the first or last page of each document. If each document contains a specific number of pages, you can specify that number. Or, you can use a field that contains data unique to the first or last page of each document (for example, a customer number).

Use the <DOCUMENT> tag to identify documents in an input. For more information, see the Enrichment Language Reference Guide.

In the following figure, a <FIELD> tag is used to watch for an occurrence of Page 1 in a document. The <DOCUMENT> tag tells Enrichment that Page 1 indicates the first page of each document. The specified field may be anywhere on the page.