AFB120 File format to a CSV file format

One Star

AFB120 File format to a CSV file format

Does anyone has a clue on how to stard from an afb120 file format and output a csv file format with making the replacements needed.
Here you can find the afb120 format specs.
Thanks a lot any help I can get from you guys.
One Star

Re: AFB120 File format to a CSV file format

looks like a record will have a fix length of 120 Bytes (or character). So you could use a tFileInputPositional to read one line after another. Extract two fields recordType (two bytes) and data. After this component use a tMap to split the data in different streams (depending on the recordType). You could decompose the data with the tExtractPositionalFields component.
You may now have the problem that you have different streams for the same data. To get the together you could use context variables. Remember that in tMap the streams are generated in the same order in which they are defined in the tMap component. So start with the first record (for a account for example) in the topmost position.
One Star

Re: AFB120 File format to a CSV file format

Hi again,
here my answer regarding your question in 5456
but besides the fact that they are positional , they also need transformation and that is where I'm stuck because
for exemple an amout can come as 1234.2N
and the N caracter is in fact a 5 and debit position. These are for bank statements,

The answer depends on the desired output. You could, for example, split the data in two values (1234.2) and (N). The second one could be used together with a lookup table with the same values provided in your link. I would add the attribute debitCreditType which will be positive or negative. If the first one would be defined as a number you could (in java) use the following code:

Additional you should care about the decimal position.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables


How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration


Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach