USE:

Int4 IFTT uses XPath expressions to extract specific values from XML files. Int4 IFTT uses our simple language (explicitly created for this purpose) for fetching values from flat file messages

PROCEDURE:

Following tags can be used in flat-file expressions:


Each tag should be separated by &&

START_TAG or START_FROM are obligatory tags (unless REGEX is used)


Example 1: To derive string IFTT001 from the exemplary flat-file below, the following expression could be used: START_TAG(BGM+220+)&&START_FROM(1)&&LENGTH(7)

This expression can be used to extract values with no ending tag or extract only a part of the value.


UNA:+.? '
UNB+UNOA:3+000000000B:ZZ+0000000ECC:ZZ+20051107:1159+6002'
UNH+000000101+ORDERS:D:96A:UN:EAN008'
BGM+220+IFTT001+9'


Example 2:  To derive string IFTT002 from the exemplary flat-file below, the following expression could be usedSTART_TAG(BGM+220+)&&END_TAG(+)

In this case, the expression will work independently of the length of the values.

UNA:+.? '
UNB+UNOA:3+000000000B:ZZ+0000000ECC:ZZ+20051107:1159+6002'
UNH+000000101+ORDERS:D:96A:UN:EAN008'
BGM+220+IFTT002+9'


Example 3: To derive string IFTT003 from the exemplary flat-file below, the following expression could be used: START_FROM(9)&&LENGTH(7)

This expression can be used to extract values with no starting and ending tags or to extract only a part of the value. This statement is handy for handling very long strings.

UNA:+.? '
UNB+UNOA:3+000000000B:ZZ+0000000ECC:ZZ+20051107:1159+6002'
UNH+000000101+ORDERS:D:96A:UN:EAN008'
BGM+220+IFTT003+9'


Example 4: To derive string IFTT004 from the exemplary flat-file below, the following expression could be usedSTART_FROM(9)&&END_TAG(+9)

In this case, the expression will work independently of the length of the values, just starting from a specific point till the end tag.

UNA:+.? '
UNB+UNOA:3+000000000B:ZZ+0000000ECC:ZZ+20051107:1159+6002'
UNH+000000101+ORDERS:D:96A:UN:EAN008'
BGM+220+IFTT004+9'


Example 5: To derive string IFTT004 from the example flat-file below, the following expression could be usedREGEX(BGM\+220\+([A-Z0-9]+)\+9)

UNA:+.? '
UNB+UNOA:3+000000000B:ZZ+0000000ECC:ZZ+20051107:1159+6002'
UNH+000000101+ORDERS:D:96A:UN:EAN008'
BGM+220+IFTT004+9'

The expression used in this example uses subgroup to extract part of the matched string. Subgroups are defined using the ( ... ) operator. REGEX(BGM\+220\+([A-Z0-9]+)\+9)
Expression REGEX(BGM\+220\+[A-Z0-9]+\+9) without subgroup matches entire line: BGM+220+IFTT004+9'


Please note that the LENGTH tag works only combined with START_FROM.


It is possible to use multiple expressions for a single variable processor and join them with the || operator. All matching values are collected and saved to the same variable then.