Example of indexing with data values

This example shows how to use the ACIF parameters described in ACIF parameters. Example bank statement input file shows the print file for a typical bank statement.

Example bank statement input file

1ACCOUNT NUMBER: 445-66-3821-5        PAGE 1
 DATE: 09/30/09
 CHECK# 001 - 455.00
 CHECK# 002 - 337.85
1ACCOUNT NUMBER: 333-56-4378-5        PAGE 1
 DATE: 09/30/09
 CHECK# 221 - 5.00
 CHECK# 222 - 1567.35

In Example bank statement input file, the print file contains bank statements dated September 30, 2009 (09/30/09). Each statement has the same general format, although statements might vary in size or number of pages. Assume you want to index the bank statements with the account number and the date. Although the account number identifies each customer's account, the date is important to differentiate one month's statement from another. For ACIF to extract the account number and date, it must first locate the records that contain the required information.

Because ACIF can process different data streams with various file formats (for example, carriage control characters, no carriage control characters, and table-reference characters), it requires triggers to determine an anchor point from which it can locate the necessary index values. You can require multiple triggers to uniquely identify the start of a new statement. To index the bank statements with the account number and the date, first define the trigger values and the fields as shown in ACIF processing parameters to index a bank statement.

ACIF processing parameters to index a bank statement

TRIGGER2=0,39,'PAGE 1'

The information in ACIF processing parameters to index a bank statement defines two trigger values:

  • The first trigger instructs ACIF to examine the first byte of every input record until it finds the occurrence of an ANSI skip-to-channel 1 carriage control character ('1'). Because each page created by this particular application can contain this carriage control character, this trigger alone does not identify the start of a new bank statement.
  • The second trigger accomplishes this task. When ACIF locates a record that contains a '1' in the first byte, it looks for the string ‘PAGE 1’ in that same record, starting at byte (column) 39. If this condition is found, a new statement exists, and ACIF uses the record that contains TRIGGER1 as the anchor point. The FIELDn definitions are relative to this anchor point.

In ACIF processing parameters to index a bank statement, the account number has four fields. These fields can be defined as one field if the dashes are included as part of the index information. The date has three fields to remove the forward slashes. After ACIF extracts all of the necessary indexing information for this statement, it begins looking for TRIGGER1 again. This process is repeated until the entire print file is processed.

In summary, when ACIF indexes an input file, it first scans the input file to find matches for its parameters. When ACIF finds matches in the input file, it inserts structured fields immediately before the corresponding pages of the output file. Also, ACIF places structured fields in the index object file that point to matches in the output file.