OL Learn

How to change mapping for a record based on first few bytes?

Each record is a single line, with fields positionally delimited. (IE: “FirstName” is positions 100 to 125 in the line). However, the field map of the line will vary depending on the first 4 characters of the line. If the line begins 0001 then the line will use one layout with certain fields. If the line begins 0002 then this is a different type of record with different fields and a different layout.
It’s true that at least one of the fields will match in all layouts, and thus I may have some records with name and address data, others with account(s) data, and others with transactions. How do I have the datamapper select a layout based on the contents of the first field (fortunately always four characters.)

Use ‘multiple conditions’ step with Position 1-4 as your left operand. Each of your record types then becomes a case and you can have separate extractions for each record type