Processing Steps

The steps in Enrichment processing are listed below. Not all steps are performed for each of the three processing types. See the diagrams in Process Flow Diagrams to find out which steps are performed with each type of processing.

Validate Control File and Compile Rules

When you run Enrichment, it first conducts a complete scan of the control file and rules to ensure their validity.

Validation for the control file includes checking that all tag groups begin and end properly, are nested properly (when appropriate), and contain properly coded tags. Control file validation also checks for the existence of all named files. Enrichment then adds any messages returned from the validation process to the Enrichment Report file. Any severe error conditions halt processing when they occur.

Rule file compilation includes syntax checking for all rules and functions, as well as confirmation that named files exist on the system. Again, Enrichment records error conditions in the Enrichment Report file and halts processing if a severe error occurs.

Run START: Rules

Enrichment initializes variable values. The START: section of the rule file runs once per application.

Read and Analyze One Document

Enrichment performs any print stream analysis tasks coded into the control file. Typical print stream analysis tasks include:
  • Identifying individual documents and pages within the print streams
  • Identifying data to be read or extracted from the print streams
  • Finding address information within the print streams

CASS™ Cleanse Address

If the control file contains a CASS tag group, Enrichment passes addresses to the specified address hygiene software. The cleansing software returns a new (cleansed) address and certain return codes.

Store Document

The contents of each document and its associated variables are temporarily stored for future access.

Sort Documents by ZIP Code™ and Call a CASS™ tool

If the control file contains a CASS tag group and the <DOUBLESORT> tag is set to YES, Enrichment performs <DOUBLESORT> tag functions to sort print data by ZIP Code™, then uses the specified address hygiene software to cleanse addresses.

Sort Documents by <SORTMATCH>

If the control file contains a Sortmatch tag group, Enrichment sorts documents within the print streams into the specified order.

Match Multiple Inputs

If matching is specified in the Sortmatch tag group, Enrichment matches documents appropriately. For additional information, refer to the section on the Sortmatch tag group in Enrichment Language Reference Guide.

Retrieve One Document from Storage

The contents of each document are read from temporary storage.

Run DOCUMENT: Rules

Enrichment processes rules, built-in functions, and user-written functions in the DOCUMENT: section of the rule file. Enrichment processes DOCUMENT: rules once for each document.

Add Electronic Inserts

If the control file contains the Insertrec and/or Insertpage tag groups, Enrichment inserts the appropriate information at the designated locations in the documents.

Write Presort Record to <SORTFILE>

If the control file contains a Presort tag group, Enrichment writes a record composed of Presort sort parts to the Presort Index file.

Presort

As appropriate, Enrichment calls a program to presort documents in the output print streams. Enrichment can call any external program including a sort program.

Run PRESORTED: Rules

Enrichment processes PRESORTED: section rules for each document the presorted output.

Prepare Output Document

Enrichment prepares the output print streams according to Output group tagging.

Run PAGE: Rules

Enrichment processes the PAGE: section rules once for each page in each output document.

Write One Page to Output

With all other processing complete, Enrichment writes the document page to the output file.

Write Sidefile Record or Index

Enrichment creates any index files (such as the AFP Index or the Reprint Index) or side files defined in the control file.

Run FINISH: Rules

Enrichment processes the FINISH: section rules (write reports, banners, and so on). Enrichment processes FINISH: rules once per application.

Summarize Processing

Enrichment summarizes the entire processing run in the Enrichment Report file.