Trigger field

A trigger field is a field that is based on the location of a trigger string value.

FIELDn={record,column,length,([TRIGGER=1 | n,]BASE={0 | TRIGGER [,DEFAULT=value | X'value'][‘REGEX=regular expression' | REGEX=X'regular expresion])}
The values are:
n
The field parameter identifier. When adding a field parameter, use the next available number, beginning with 1 (one).
record
The relative record number from the trigger on which the field is The relative record number from the trigger on which the field is field. The supported range of values are ±0 to 255.
column
The relative column number from the BASE. This is the column number where ACIF begins to search for the field. A value of 1 (one) refers to the first byte in the record. For files containing carriage-control characters, column one refers to the carriage-control. For those applications that use a specific carriage-control character to define page boundaries (for example, skip-to-channel one), consider defining the value of the carriage-control character as one of the TRIGGER parameters. If you specify BASE=0, the column value can be 1 to 32756. If you specify BASE=TRIGGER, the column value can be –32756 to 32756.
Note: When specifying the column number of the field, if the specified value exceeds the physical length of the record, ACIF reports an error condition and terminates processing, unless you specify a DEFAULT value.
length
The number of contiguous bytes (characters) that compose the field. The supported range of values are 1 to 250. The field can extend outside the record length, if the column where it begins lies within the record length. In this case, ACIF adds padding blanks to fill out the record. If the field begins outside the maximum length of the record, ACIF reports an error condition and terminates processing, unless you specify a DEFAULT value.
TRIGGER=n
Identifies the trigger parameter ACIF uses to locate the field. This is an optional parameter, but the default is TRIGGER1. Replace n with the number of a defined TRIGGER parameter.
BASE={0 | TRIGGER}
Determines whether ACIF uses the starting column number of the trigger string value to locate the field data. Choose from 0 (zero) or TRIGGER.
BASE=0
ACIF adds zero to the field column offset. If BASE=TRIGGER, ACIF adds the starting column number of the trigger string value to the field column offset. You should use BASE=0 if the field data always starts in a specific column.
BASE=TRIGGER
You should use BASE=TRIGGER if the field data doesn't always start in a specific column, but is always offset from the trigger string value a specific number of columns. For example, a trigger occurs in the second record on a page. The trigger string value can begin in any column in the record. A field based on this trigger occurs in the trigger record. The starting column number of the field is always ten bytes from the starting column number of the trigger. Specify BASE=TRIGGER and a column offset of ten so that ACIF correctly locates the field, regardless of the starting column of the trigger string value.

The field parameter in the following example causes ACIF to locate field values that begin in column 83 of the same record that contains the TRIGGER1 string value. The field length is 8 bytes. BASE=0 is specified because the field data always starts in the same column.

TRIGGER1=*,1,'1',(TYPE=GROUP)
FIELD1=0,83,8,(TRIGGER=1,BASE=0)

The field parameter in the following example causes ACIF to locate field values that begin 10 columns offset from the trigger string value. By basing the field on TRIGGER2 and specifying BASE=TRIGGER, ACIF can locate the field by adding 10 to the starting column offset of the trigger string value.

TRIGGER2=*,*,'ACCOUNT:',(TYPE=FLOAT)
FIELD2=0,10,12,(TRIGGER=2,BASE=TRIGGER)