Indexing data in the input file

The parameter file that you create runs the ACIF program to index the input file.

Note: ACIF does not look for indexing information in PTOCA objects or Unicode complex text, and does not use PTOCA text controls to index the file.

The example in Example of an AIX parameter file for ASCII input data uses these data values as the indexing attributes:

  • Account Number
  • Name
  • Address
  • City, State, ZIP
  • Date Due

You must specify the ACIF indexing parameters so that the first page of each bill includes group-level indexing tags that contain the values of all five of these attributes.

To generate the indexing attributes:

  1. Specify the TRIGGER1 parameter because ACIF always scans for the data that is specified in TRIGGER1 first. Because the data contains carriage control characters, include a carriage control character of ‘1’ to indicate a new page. ACIF locates the start of a page by searching every record in the file for a trigger value of ‘1’ in column 1 of the data. Specify this parameter:
    • TRIGGER1 = *,1,'1'

    When ACIF finds a record that contains a ‘1’ in column 1, that record becomes the indexing anchor record.

  2. Define subsequent TRIGGERn parameters relative to the indexing anchor record. In this example, you want to ensure that the page that is indexed is the first page of the bill, which is the only page in the bill that has the text ‘ACCOUNT NUMBER’ starting at byte 50 in the 13th record that follows the anchor record. To specify this additional trigger for locating the correct page to index, enter:
    • TRIGGER2 = 13,50,'ACCOUNT NUMBER'

    ACIF uses both trigger values to locate a place in the file to begin searching for the data that is supplied in the INDEXn parameters.

  3. Specify the attribute name of the first indexing parameter as 'Account Number', and define the location of the attribute value in the data relative to the index anchor record set by TRIGGER1. Because the data value for the Account Number attribute is in the 13th record from the index anchor record that starts in byte 66 and extends for 15 bytes, specify:
    • FIELD1=13,66,15
    • INDEX1='Account Number',FIELD1
  4. Define 'Name' as the indexing attribute to create the indexing tag for the Name attribute. Locate the value for ‘Name’ in the anchor record in the data that starts at byte 50 and extends for 30 bytes. These are the ACIF parameters to specify:
    • FIELD2=0,50,30
    • INDEX2='Name',FIELD2
  5. Repeat this process to specify the other three indexing tags so that the index attributes and values are defined as follows:
    • INDEX1='Account Number',FIELD1
      • 'Account Number' is the first index attribute
      • FIELD1 maps to the FIELD1 index value, which is:
        • 13 lines down from the indexing anchor record
        • 66 columns across
        • 15 bytes in length
    • INDEX2='Name',FIELD2
      • 'Name' is the second index attribute
      • FIELD2 maps to the FIELD2 index value, which is:
        • 0 lines down (in the indexing anchor record)
        • 50 columns across
        • 30 bytes in length
    • INDEX3='Address',FIELD3
      • 'Address' is the third index attribute
      • FIELD3 maps to the FIELD3 index value, which is:
        • 1 line down from the indexing anchor record
        • 50 columns across
        • 30 bytes in length
    • INDEX4='City, State, ZIP',FIELD4
      • 'City, State, ZIP' is the fourth index attribute
      • FIELD4 maps to the FIELD4 index value, which is:
        • 2 lines down from the indexing anchor record
        • 50 columns across
        • 30 bytes in length
    • INDEX5='Date Due',FIELD5
      • 'Date Due' is the fifth index attribute
      • FIELD5 maps to the FIELD5 index value, which is:
        • 4 lines down from the indexing anchor record
        • 60 columns across
        • 12 bytes in length

The result of using these indexing parameters is that the first page of each bill in the ACIF output file contains indexing tags for each of the five indexing attributes. Using AFP Workbench Viewer, customer service representatives can locate a single customer bill in the ACIF document by using any combination of the indexing attributes.