TRIGGERn

Specifies the locations and values of data fields within the input file that are to be used to define indexing groups in the file. These data fields are referred to as triggers because their presence in the file triggers a processing action. A maximum of four TRIGGERn parameters can be specified. The number of TRIGGERn parameters that are required to uniquely identify the beginning of a group of pages within the file is a function of the complexity of the application output. TRIGGER1 is special and each record in the file that contains this value is referred to as an indexing anchor record. The presence of a TRIGGERn parameter causes ACIF to index the input file.

You can use a trigger value or a regular expression, but not both.

TRIGGERn={record | *}{,column | *startColumn:endColumn}{,'triggervalue' | X'triggervalue'} | {REGEX='regular expression’ | REGEX=X'regular expression’}[,(TYPE=type)]
Options and values:
n

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

record | *
Specifies the relative record number from the indexing anchor record (TRIGGER1). A value of * must be specified for TRIGGER1 and cannot be specified for any other TRIGGERn parameter; * indicates that every record is checked for the presence of the TRIGGER1 value. After the TRIGGER1 value is found, all other TRIGGERn parameter values are specified as a relative offset from TRIGGER1. ACIF reports an error condition and ends processing if an * is specified with any TRIGGERn parameter other than TRIGGER1. The supported range of values for record is 0 - 255.
column | *
If ACIF is using a value, then this is the beginning column where ACIF locates the trigger string value. If ACIF is using a regular expression, then this is the beginning column where ACIF looks for text that matches the regular expression. The regular expression must match text which begins in the specified column. If a column range is specified, then ACIF will only search the columns in the column range for the text that matches the regular expression. The regular expression must match text which begins in one of the columns specified by the column range. The maximum number of columns to which the regular expression can be applied is 2K (2048 bytes). If there are records in the file which are longer, use a trigger column range to specify a subset of the record. The supported range of column numbers is 0 to 32756. To force ACIF to scan every record from left to right for the trigger string value, specify an * (asterisk) or 0 (zero) for the column. A 1 (one) refers to byte one of the record. Alternatively, you can specify a beginning and ending column range and separate them by a colon. If you specify a column range, the beginning column cannot be zero, and the ending column must be greater than the beginning column. See the examples below:
Important: Scanning every record can incur a substantial performance penalty. The overhead required to scan every record can cause the indexing step of the load process to take considerably longer than normal. Whenever possible, specify a beginning column number
'triggervalue' | X'triggervalue'
Specifies the actual alphanumeric or hexadecimal value of the trigger. ACIF does not do any validity checking on this value, but uses it in doing a byte-for-byte comparison with the records in the file. The trigger value can be 1 - 250 bytes in length. If the combined values of column and the trigger length exceed the physical length of the record, ACIF considers the comparison false and continues processing.
Note: The trigger value can be specified as ASCII character data or hexadecimal data. However, if the input data file is anything other than ASCII, the value must be specified as hexadecimal data.

The following example shows how to use a carriage control character as a trigger:

TRIGGER1=*,1,'1'             /* Look for Skip-to-Channel 1
TRIGGER2=0,50,'ACCOUNT:'     /* Find account number
TRIGGER3=3,75,'Page 1'       /* Find page 

In this example, TRIGGER1 instructs ACIF to scan every record, looking for the occurrence of '1' in the first byte. After ACIF locates a record that contains '1', it looks in the same record, starting at byte 50, for the occurrence of 'ACCOUNT:'. If 'ACCOUNT:' is found, ACIF looks at the third record for a value of 'Page 1', starting at byte 75. If 'Page 1' is found, ACIF defines the record that contains TRIGGER1 as the indexing anchor record and all indexing information is specified as relative locations relative from this point.

If ACIF finds either 'ACCOUNT:' or 'Page 1', it begins scanning the first record after the farthest field specified. If neither 'ACCOUNT:' nor 'Page 1' is found at its specified location relative to TRIGGER1, ACIF begins looking for TRIGGER1 again, starting with the next record (that is, the current record that contains TRIGGER1 + 1).

REGEX ='regular expression'=X'regular expression’
The regular expression that ACIF uses to match the input data. The regular expression must be specified in the code page given by the CPGID parameter, and can be from 1 to 250 bytes in length. The regular expression can be specified in hexadecimal. You can specify either a value or a regular expression, but not both.

See Hints and Tips Using Regular Expressions for more information about regular expression.

TYPE=type
The default trigger type is group. TRIGGER1 must be a group trigger. Valid trigger types are:
GROUP
Triggers that identify the beginning of a group. Define only as many group triggers as needed to identify the beginning of a group. In many cases, you may need only one group trigger.
GROUP,RECORDRANGE=(start,end)
Triggers that identify field data that is not always located in the same record relative to TRIGGER1. ACIF determines the location of the field by searching the specified range of records. The range can be from 0 to 255. ACIF stops searching after the first match in the specified range of records. For example, if the range is 5,7 and records six and seven contain the trigger string value, ACIF stops after matching the value in record six.
FLOAT
Triggers that identify field data that does not necessarily occur in the same location on each page, the same page in each group, or in each group. ACIF determines the location of the field by searching every input record for the trigger string value or regular expression starting in the specified column (or every column, if an asterisk is specified). For example, you need to index statements by type of account. Possible types of accounts include savings, checking, loan, IRA, and so forth. Not all statements contain all types of accounts. This causes the number of pages in a statement to vary and the page number where a specific type of account occurs to vary. However, each type of account is preceded by the string ”Account type”. Define a float trigger with a trigger string value of Account Type. The same float trigger can be used to locate all of the accounts that occur in a statement.
Group triggers
In ACIF, a group is a named collection of sequential pages that form a logical subset of an input file. A group must contain at least one page; a group can contain all of the pages in an input file. However, most customers define their group triggers so that ACIF can logically divide an input file into smaller parts, such as by statement, policy, bill, or, for transaction data, number of pages. A group is determined when the value of an index changes (for example, account number) or when the maximum number of pages for a group is reached. ACIF generates indexes for each group in the input file. Because a group cannot be smaller than one page, a group trigger (or triggers) should not appear more than once on a page. See the BREAK option of the INDEX parameter for more information about breaking groups.
    Note:
  1. ACIF requires that at least one group TRIGGERn value appear within the page range that is specified by the INDEXSTARTBY parameter. If no group TRIGGERn parameter is satisfied within the INDEXSTARTBY page range, then ACIF stops processing and issues an error message.
  2. At least one TRIGGERn or FIELDn value must exist on the first page of every unique page group. ACIF cannot detect an error condition if TRIGGERn or FIELDn is missing, but the output might be incorrectly indexed.
  3. TRIGGER1 must be specified when ACIF is requested to index the file.
  4. An error condition occurs if you specify any TRIGGERn parameters when the input file contains indexing tags.
  5. When running ACIF on a Windows server and you define a TRIGGER parameter using structured field data, you must change the order of the length bytes in the trigger string value. The length bytes are bytes two and three of a structured field. Some instructions in the Windows architecture use the length bytes in the reverse of the order that they appear in the input data. ACIF automatically changes the order of the length bytes in all input structured fields before indexing the data. For example, in the input data, a structured field may appear as follows: 5A0010D3EEEE00. . .In the example, the hexadecimal value 0010 represents the length of the structured field (16 bytes following the 5A). To support the Windows architecture, after reading the input data into its storage, ACIF changes the order of the length bytes before indexing the data. The example data would appear in ACIF storage as follows: 5A1000D3EEEE00. . .. When defining a TRIGGER parameter using structured field data, the order of the length bytes in the trigger string value must be the same as the data in ACIF storage, not the original input data. For example: TRIGGER1=*,1,X’5A1000D3EEEE00. . .’. Before writing the output data, ACIF restores the length bytes to their original locations.

See Enhanced indexing parameters for information about using the TRIGGERn parameter with enhanced ACIF indexing.