TRIGGERn

Specifies locations and values that are required to uniquely identify the beginning of a group and the locations and values of data fields that are used to define indexes. These data fields are referred to as triggers because their presence in the file triggers a processing action. You must specify at least one TRIGGERn parameter and you can specify a maximum of eight parameters. When you are adding a trigger parameter, use the next available number, beginning with 1.

TRIGGERn={record | *}{,column | * |startColumn:endColumn}{,'triggervalue' | X'triggervalue'}|,{REGEX=‘regular expression’| REGEX=X‘regular expression’}[,(TYPE=type)]
The values are:
n
Specifies the trigger parameter identifier.
record | *
Specifies the input record where ACIF locates the trigger value. You must specify an asterisk value (*) for TRIGGER1, record range triggers, and float triggers so that ACIF searches every input record for the trigger value. For other group triggers, the input record is relative to the record that contains the TRIGGER1 value. The supported range of record numbers is 0 - 255.
column | * | startColumn:endColumn
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:

The following example of a column range shows a trigger parameter that causes ACIF to search in columns 15 through 18 for a string containing the letter "P" followed by three lowercase letters. The TYPE is GROUP by default.

CPGID=500
TRIGGER1=*,15:18,REGEX=X'D74A8160A95AC0F3D0'   /* P[a-z]{3} 

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
'value'
The actual string value ACIF uses to match the input data. The string value is case sensitive. If the input data is encoded in EBCDIC, enter the value in hexadecimal. The value can be from 1 to 250 bytes in length. You can specify either a value or a regular expression, but not both.
'triggervalue' | X'triggervalue'
Specifies the actual alphanumeric or hexadecimal value of the trigger that ACIF uses to match the input data. The trigger value can be 1 - 250 bytes in length and is case-sensitive.
Note: The trigger value can be specified as EBCDIC character data or hexadecimal data. However, if the input data file is anything other than EBCDIC, the value must be specified as hexadecimal data.
REGEX ='regular expression' | REGEX=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.
    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.
TYPE={GROUP | GROUP,RECORDRANGE=(start,end) | FLOAT
The trigger type. TRIGGER1 must be a GROUP trigger. The types are:
GROUP
Specifies the beginning of a group. In ACIF, a group is a named collection of sequential pages that form a logical subset of an input file. You define only as many group triggers as needed to identify the beginning of a group. In many cases, you need only one group trigger.

A group must contain at least one page, and it 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 must not appear more than once on a page. See the BREAK option on the INDEX parameter for more information about breaking groups.

The following example indicates that ACIF searches column one of every input record for the occurrence of a skip-to-channel 1 carriage control character. The record value for TRIGGER1 must be an asterisk (*) and TRIGGER1 must be a GROUP trigger. The input data is encoded in EBCDIC.

TRIGGER1=*,1,'1',(TYPE=GROUP)

The next example indicates that ACIF matches the PAGE 1 value beginning in column two of every input record. The record value for TRIGGER1 must be an asterisk (*) and TRIGGER1 must be a GROUP trigger. The input data is encoded in EBCDIC. .

TRIGGER1=*,2,'PAGE 1',(TYPE=GROUP)

The final example indicates that ACIF matches the Account Number value beginning in column fifty of the sixth input record following the TRIGGER1 record. The input data is encoded in EBCDIC.

TRIGGER2=6,50,'Account Number',(TYPE=GROUP)

GROUP,RECORDRANGE=(start,end)
Specifies field data that is not always 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 0 - 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 value, ACIF stops searching after it matches the value in record six.

The following example indicates that ACIF locates the Account Number value beginning in column 50 within a range of records (the trigger value can occur in records six, seven, or eight following TRIGGER1) in each group. You must specify an asterisk (*) for record number because ACIF uses the record range to determine which records to search for the trigger value. The input data is encoded in EBCDIC.

TRIGGER2=*,50,'Account Number',(TYPE=GROUP,RECORDRANGE=(6,8))

FLOAT
Specifies 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 value that starts 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, and IRA. Because not all statements contain all types of accounts, the number of pages in a statement can vary and the page number where a specific type of account occurs can 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.

The following example indicates that ACIF matches the Type of Income value, beginning in column five of every record in the group. You must specify an asterisk (*) for the record number. The input data is encoded in EBCDIC.

TRIGGER3=*,5,'Type of Income',(TYPE=FLOAT)

    Note:
  1. ACIF requires that at least one TRIGGERn or FIELDn value appear within the page range that is specified by the INDEXSTARTBY parameter (unless INDEXSTARTBY=0 is specified). If no TRIGGERn or FIELDn parameter is satisfied within the INDEXSTARTBY page range, ACIF stops processing and issues an error message. If you do not want ACIF to stop processing when it cannot find a group indexing field or when a file is empty, you must set the parameter to INDEXSTARTBY=0 or specify EXTENSIONS=EMPTYOK.
  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.