Splf extractor: Tokens

Splf extractor: Tokens

Warning

IMPORTANT: The spooled file extractor is no longer supported. Any spooled file extractor definitions, that has previously been designed can still be used in the workflow, but they cannot be edited.

The better alternative is to use the designer for transformation.

In the spooled file extractor you can build conditions to conditionally select section of the spooled file. Whenever you add a condition you compare the selected text with a token.

Predefined tokens

InterformNG2 is delivered with these predefined tokens:

Token
Description
Digit
One of the digits: 0..9
Letter
A character, that is not a number and not a space/blank/whitespace/NewLine
EmptyLine
True if the complete line (inside the selected spooled file area) is blank/empty.
NewLine
The new line (line feed). This is true for the last +1 character on each line of the selected area.
WhiteSpace
Blank/space
Token
Characters not listed above in the other tokens e.g. ,;:.-_§½!"#¤%&/()=?`|@£$€{[]}+´

This sections contains this:


How to create a token

Edit a token

Delete a token

How to create a token

If you want to add a condition, that is to compare with a very specific text, that is not included in the list of predefined tokens above, then you can create your own tokens.

In the spooled file extractor editor you first need to click the tokens tab in the top left:


 

Now you see a list of the tokens defined in the transform definition, that you are currently editing and in the bottom left you can click the icon add token to add a new one:



Then you can move on and edit the token as described below. The new token is added on the top in red.


How to edit a token

If you select the token tab on the upper left, then you will see the list of user defined token like below:

NG2SFE0030

 

The token is defined via next fields:

  1. Name
    The name of the token. This is what you need to reference in conditions later.
  1. Type
    This sets the type of description, that you want to use to define the comparison text. You have two options:

Pattern

Here you define a pattern to compare with. You have these options:

Text constant: A text constant must be delimited with double quotes e.g. "abc".

C: Use a C to indicate any kind of character.

D: A digit

H: A hexadecimal number (i.e. 0123456789ABCDEF)

_: Whitespace/blank character

 

Each of the options above can be combined.

If you e.g. use the pattern: "abc"CCC_DDD, then this will e.g. match the text abcdef 007.

RegExp

Here you can state a regular expression. If you simply want to compare with a text constant, then you simply write the text without any delimiter.

More information about regular expressions can e.g. be found here: https://regexone.com/. You can e.g. test your regular expressions here. https://regex101.com/

 

Here are a few examples:

NG2SFE0031


Delete a token

If you want to delete a token, then you simply need to click the trash can icon to the right of the token:

NG2SFE0032

    • Related Articles

    • Splf extractor: Conditioned mappings

      IMPORTANT: The spooled file extractor is no longer supported. Any spooled file extractor definitions, that has previously been designed can still be used in the workflow, but they cannot be edited. The better alternative is to use the designer for ...
    • Introduction to the Spooled file extractor

      IMPORTANT: The spooled file extractor is no longer supported. Any spooled file extractor definitions, that has previously been designed can still be used in the workflow, but they cannot be edited. The better alternative is to use the designer for ...
    • Splf extractor: Simple mapping

      IMPORTANT: The spooled file extractor is no longer supported. Any spooled file extractor definitions, that has previously been designed can still be used in the workflow, but they cannot be edited. The better alternative is to use the designer for ...
    • Splf extractor: Expanable parent

      IMPORTANT: The spooled file extractor is no longer supported. Any spooled file extractor definitions, that has previously been designed can still be used in the workflow, but they cannot be edited. The better alternative is to use the designer for ...
    • Splf extractor: Overlapping mappings

      IMPORTANT: The spooled file extractor is no longer supported. Any spooled file extractor definitions, that has previously been designed can still be used in the workflow, but they cannot be edited. The better alternative is to use the designer for ...