<OUTPUT>

The <OUTPUT> command sets which output or outputs Enrichment will send a document to.

Note: Do not confuse the <OUTPUT> print stream command with the Output group.

The <OUTPUT> command syntax is as follows:

<OUTPUT> name

where name is the name of an Output group in which to place the document. For example:

DOCUMENT:
IF %%varname = 9 THEN
 <OUTPUT> output1
ELSE 
 <OUTPUT>output2 
 <OUTPUT>output3
ENDIF

You can place the same document in multiple output files using multiple <OUTPUT> commands. You can also place multiple copies of a document in a single output by using multiple <OUTPUT> commands with the same output name.

Note: If the same document is <OUTPUT> multiple times, the copies will be identical, except for any changes made in a later PAGE: section.

You can specify <OUTPUT> NONE to discard documents.

Note: <OUTPUT> NONE overrides any earlier <OUTPUT> commands for the document and cannot be overridden by a subsequent <OUTPUT> command for the same document.

The <OUTPUT> command has a slightly different function depending on which section of the rule file you use it in. The table below explains how to use the <OUTPUT> command in each rule file section.

Note: If the same document is <OUTPUT> multiple times, the copies will be identical, except for any changes made in a later PAGE section. The following table summarizes the use of <OUTPUT> in the Rule File Sections
Table 1. Use of <OUTPUT> in Rule file Sections
Rule File Section <OUTPUT> Command
START <OUTPUT> defines the output where a banner or banners will go. For example:
START: <output>Output1
<banner>Banner1
<banner>Last
<output>Output2
<banner>Banner2 

The example above would place banner Banner1 and banner Last in Output1 and would place banner Banner2 in Output2.

DOCUMENT <OUTPUT> is normally set in the DOCUMENT section to route the current document to one or more outputs.
PAGE <OUTPUT> NONE can be used to discard pages.
PRESORTED <OUTPUT> changes the output (for example, you can use it to reroute residual mail to another output).
FINISH <OUTPUT> defines the output where a banner or banners will go. For example:
FINISH: 
<output>Output1
<banner>Banner1
<banner>Last
<output>Output2
<banner>Banner2 

The example above would place banner Banner1 and banner Last in Output1 and would place banner Banner2 in Output2.

You can also use <OUTPUT> to reference output-specific system variables. For example:

FINISH:
<output>Output1
write(*,%%OUT_PAGE)
<output>Output2
write(*,%%OUT_PAGE) 

The example above would write two different total page numbers, the first for Output1 and the second for Output2.