INDEX

Identifies the index name, the field or fields on which the index is based, and the type of index ACIF generates.

Required
Yes
Default Value
(None)
Data Type
AFP, Line
You can define group indexes for AFP and line data. You can define page indexes for AFP data and line data that you convert to AFP. You must define at least one index parameter. You can define up to 128 index parameters. When you define a group index, IBM® recommends that you name the index the same as the application group database field name.
Important: Group indexes are stored in the database and used to search for documents. Page indexes are stored with the document, not in the database. This means that you cannot use page indexes to search for documents. After retrieving a document, you can use the page indexes to move to a specific page in the document by using the Go To command in the client.

To generate page-level information in the output file you must specify CONVERT=YES. This type of page-level information is used in the client to move to specific pages in a document. ACIF can only generate this type of page-level information when converting the input data to AFP. This type of page-level information is generated by specifying the CONVERT=YES and INDEXOBJ=ALL parameters, and by creating an index field with the TYPE=PAGE option.

Syntax

INDEXn=name,FIELDnn[,...FIELDnn][,(TYPE=type)]

Options and values

  • n

    The index parameter identifier. When adding an index parameter, use the next available number beginning with 1 (one).

  • name

    Determines the index name associated with the actual index value. For example, assume INDEX1 is to contain account numbers. The string acct_num would be a meaningful index name. The index value of INDEX1 would be an actual account number, for example, 000123456789. The index name can be a maximum of 250 bytes in length.

    The index name can be specified either as character data or hexadecimal data. If the input file is anything other than ASCII, then the index name must be specified as hexadecimal data. Specify a hexadecimal value using the format X'name', where name is hexadecimal data, for example, X'95819485'.

  • FIELDnn

    The name of the field parameter or parameters ACIF uses to locate the index. You can specify a maximum of 128 field parameters. Separate field parameter names with a comma. The total length of all the specified field parameters cannot exceed 250 bytes.

    GROUPRANGE and PAGERANGE indexes must name one and only one transaction field. PAGE indexes must name fields based on floating triggers.

    GROUPRANGE, PAGE, and PAGERANGE indexes cannot break a group – you must specify BREAK=NO.

    An index that names a field based on a floating trigger must be TYPE=GROUP or TYPE=PAGE and must specify BREAK=NO.

  • TYPE=type

    The type of index ACIF generates. You can define group indexes for AFP and line data. You can define page indexes for AFP and line data. The default index type is GROUP. Valid index types are:

    • TYPE=GROUP[,BREAK={YES|NO}]

      Create a group index value. ACIF creates one index value for each group.

      You can specify whether ACIF includes or ignores the index when calculating a group break. When BREAK=YES (the default), ACIF begins a new group when the index value changes. For most reports, break should always be set to yes. BREAK=NO is useful when you define two or more indexes and you want ACIF to begin a new group only when a specific index value changes. Specify BREAK=YES for the index that you want ACIF to use to control the group break. Specify BREAK=NO for the other indexes.

      A GROUP index that names a field parameter based on a floating trigger must specify BREAK=NO.

    • TYPE=GROUPRANGE[,BREAK=NO]

      Create group indexes. ACIF creates index values for the first and last sorted values in each group. ACIF creates indexes for the group by extracting the first and last values that match the MASK or the regular expression of the transaction field on which the index is based. ACIF assumes that the input values are sorted. You can define one GROUPRANGE index per report.

      A GROUPRANGE index must name one and only one transaction field. A GROUPRANGE index cannot name a field parameter that is based on a floating trigger. A GROUPRANGE index cannot break a group.

      For a GROUPRANGE index, ACIF can use the value of the GROUPMAXPAGES parameter to determine the number of pages in a group. For example, you need to index a line data report that consists of thousands of pages of sorted transaction data. You define a GROUP index to hold the report date index values and a GROUPRANGE index to hold the transaction numbers for each group. Because every page in the report contains the same date, the GROUP index cannot be used to break the report into groups. (And a GROUPRANGE index cannot be used to break a group.) To break the report into groups, set the GROUPMAXPAGES parameter to the maximum number of pages you want in a group (for example, 100). When calculating group breaks, ACIF will use the value of the GROUPMAXPAGES parameter to determine when to close the current group and begin a new group.

    • TYPE=PAGE[,BREAK=NO]

      Create zero or more page indexes per page. Page indexes must name fields based on floating triggers. Page indexes cannot be used to break a group.

      Page indexes are stored with the document, not in the database, and cannot be used to search for documents. After retrieving a document, you can use the page indexes to move to a specific page in the document by using the Go To command in the client.

      This type of page-level information is generated by specifying the INDEXOBJ=ALL parameter, and by creating an index field with the TYPE=PAGE option. When you define a PAGE index, you must specify INDEXOBJ=ALL; otherwise, ACIF will not write the page index data to the index object file.

    • TYPE=PAGERANGE[,BREAK=NO]

      Create page indexes. ACIF creates index values for the first and last sorted values on each page. ACIF creates indexes for the page by extracting the first and last values that match the MASK or the regular expression of the transaction field on which the index is based. ACIF assumes that the input values are sorted. You can define one PAGERANGE index per report.

      PAGERANGE indexes cannot be used to break a group.

      PAGERANGE indexes must name one and only one transaction field. PAGERANGE indexes cannot name a field parameter that is based on a floating trigger.

      Page indexes are stored with the document, not in the database, and cannot be used to search for documents. After retrieving a document, you can use the page indexes to move to a specific page in the document with the Go To command in the client.

      This type of page-level information is generated by specifying the INDEXOBJ=ALL parameter, and by creating an index field with the TYPE=PAGERANGE option. When you define a PAGERANGE index, you must specify INDEXOBJ=ALL; otherwise, ACIF will not write the pagerange index data to the index object file.

Group index example

The following index parameter causes ACIF to generate group indexes for date index values. The input data is encoded in EBCDIC. The index type is optional, but defaults to group. When the index value changes, ACIF closes the current group and begins a new group.
     INDEX1=x'998481A385',FIELD1,(TYPE=GROUP,BREAK=YES)
The following index parameters cause ACIF to generate group indexes for customer name and account number index values. The input data is encoded in EBCDIC. The index type is optional, but defaults to group. ACIF closes the current group and begins a new group only when the customer name index value changes (the data is sorted by customer name). In this example, a customer might have one or more statements with different account numbers. The page numbers in each statement begin with the number one, giving the appearance of unique statements. The goal is to collect all of a customer's statements in a single group.
     INDEX1=x'95819485',FIELD1,(TYPE=GROUP,BREAK=YES)
     INDEX2=x'818383A46D95A494',FIELD2,(TYPE=GROUP,BREAK=NO) 

Grouprange index example

The Grouprange index parameter causes ACIF to generate grouprange indexes for loan number index values.
ACIF extracts the beginning and ending loan numbers in each group of pages. The input data is encoded in EBCDIC. A grouprange index must be based on a transaction field. Because a grouprange index cannot be used to break a report into groups of page, the GROUPMAXPAGES parameter can be used to determine the number of pages in a group. ACIF closes the current group and begins a new group when the number of pages in the group is equal to the value of the GROUPMAXPAGES parameter.
INDEX2=x'939681956D95A494',FIELD2,(TYPE=GROUPRANGE,BREAK=NO)
GROUPMAXPAGES=100

Page index example

The Page index parameter causes ACIF to generate page indexes for subtotal values (the attribute name that appears in the Go To dialog box is Subtotal).
The input data is encoded in EBCDIC. ACIF extracts the index values from each page. A page index must name a field that is based on a floating trigger. A page index cannot be used to break a group.
INDEX3=x'E2A482A396A38193',FIELD3,(TYPE=PAGE,BREAK=NO)

Related parameters