INDEX

Identifies the index name and the fields on which the index is based. You must define at least one index parameter.

Required
Yes
Default Value
(None)
Data Type
AFP, Line, SCS, SCS-Extended

Identifies the index name, the field or fields on which the index is based, and the type of index the 400 indexer generates. You can define group indexes for SCS, AFP, and line data. You must define at lease 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.

Syntax

INDEXn=name,FIELDnn[,...FIELDnn],TYPE=type)][,(ALLOWMULTIPLEVALUES={NO|YES})]

Options and values

n
The index parameter identifier. When you add an index parameter, use the next available number beginning with 1.
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, 00123456789. The index name can be a maximum of 250 bytes in length. 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'. The creation of the hexadecimal data is done for you automatically by the graphical indexer.
FIELDnn
The name of the field parameter or parameters the 400 indexer uses to locate the index. A maximum of 128 field parameters can be specified. Separate field parameter names with a comma. The total length of the contents of all the specified field parameters cannot exceed 250 bytes. For example, the value of FIELD1 might be "(888) " and the value of FIELD2 might be "555-1212". If INDEX1 is defined as
INDEX1 = X’D788969585’,FIELD1,FIELD2,(TYPE=GROUP)
then the values of FIELD1 and FIELD2 is concatenated into INDEX1. The total length of the concatenated string cannot exceed 250 bytes. GROUPRANGE indexes must name only one transaction field. GROUPRANGE indexes cannot break a group - you must specify BREAK=NO.
TYPE=type
The type of index the 400 indexer generates. The default index type is GROUP. The following list has valid index types:
  • TYPE=GROUP[,BREAK={YES|NO}][,(ALLOWMULTIPLEVALUES= {NO|YES})]
    Create a group index value. The 400 indexer creates one index value for each group. You can specify whether the 400 indexer includes or ignores the index when calculating a group break. When BREAK=YES (the default), the 400 indexer begins a new group when the index value changes. For most reports, BREAK must always be set to YES. BREAK=NO is useful when you define two or more indexes and you want the 400 indexer to begin a new group only when a specific index value changes. Specify BREAK=YES for the index that you want the 400 indexer to use to control the group break. Specify BREAK=NO for the other indexes. A GROUP index that specifies BREAK=NO can also specify ALLOWMULTIPLEVALUES=YES if you want the 400 indexer to collect multiple values for this index for each group (document). This concept is also known as multi-key. The default is NO, which causes the 400 indexer to collect only the first occurrence of an index within a given group. Specify YES if you want multiple values for this index to be collected per group. An example of the use of this multi-key capability might be for an invoice that has multiple part numbers that are listed on the detail lines of the invoice. Without the multi-key capability, the 400 indexer would only collect the first one of the part numbers on the page. Multi-key tells the 400 indexer to continue to collect multiple part numbers before moving on to the next invoice. See Defining multi-key indexes for more information.
  • TYPE=GROUPRANGE,BREAK=NO
    Create group indexes. The 400 indexer creates index values for the first and last sorted values in each group. The 400 indexer creates indexes for the group by extracting the first and last values that match the MASK of the transaction field on which the index is based. The 400 indexer assumes that the input values are sorted. You can define one GROUPRANGE index per report. A GROUPRANGE index must name 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, the 400 indexer uses the value of the GROUPMAXPAGES parameter to determine the number of pages in a group. For example, you need to index a 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, the 400 indexer will use the value of the GROUPMAXPAGES parameter to determine when to close the current group and begin a new group.

Examples

Group index
The following index parameter causes the 400 indexer to generate group indexes for date index values. The index type is optional, but defaults to group. When the index value changes, the 400 indexer closes the current group and begins a new group.
INDEX1=’6C6F61645F64617465’,FIELD1,(TYPE=GROUP,BREAK=YES)
The following index parameters cause the 400 indexer to generate group indexes for customer name and account number index values. The index type is optional, but defaults to group. The 400 indexer 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=’95819485’,FIELD1,(TYPE=GROUP,BREAK=YES) 
INDEX2=’818383A46D95A494’,FIELD2,(TYPE=GROUP,BREAK=NO)
Grouprange index
The following index parameter causes the 400 indexer to generate grouprange indexes for loan number index values. The 400 indexer extracts the beginning and ending loan numbers in each group of pages. 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 is used to determine the number of pages in each group. The 400 indexer 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=’4C6F616E204E756D626572’,FIELD2,(TYPE=GROUPRANGE,BREAK=NO) 
   GROUPMAXPAGES=100