<div dir="ltr"><div>Thanks for this.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>In the current implementation the method AccountNumberCheck::readFile() reads it from the data file</div><div>but the data file doesn't contain any such field afaik.</div></div></blockquote><div><br></div><div>Don't know why I said that. It is literally the second field of the datafile. I apologise for this.</div><div>I really don't know how I missed it.</div><div><br></div><div>Thanks for the help.</div><div>Prasun<br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 14 Jun 2020 at 14:43, Thomas Baumgart <<a href="mailto:thb@net-bembel.de">thb@net-bembel.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sonntag, 14. Juni 2020 10:13:22 CEST Prasun Kumar wrote:<br>
<br>
> Thanks for the guidance.<br>
> Another question, how is AccountNumberCheck::Record::method supposed to be<br>
> used?<br>
> In the current implementation the method AccountNumberCheck::readFile()<br>
> reads it from the data file<br>
> but the data file doesn't contain any such field afaik.<br>
<br>
Looking at the code in AccountNumberCheck::readFile(const string &filename) and<br>
the current data file at the same time, I see some problems. Maybe, the data<br>
file format changed in the meantime, I have not checked.<br>
<br>
Anyway, the format in the text file (obtained from<br>
<a href="https://www.bundesbank.de/resource/blob/602632/31fec41357f012d537ce62045395929a/mL/blz-aktuell-txt-data.txt" rel="noreferrer" target="_blank">https://www.bundesbank.de/resource/blob/602632/31fec41357f012d537ce62045395929a/mL/blz-aktuell-txt-data.txt</a><br>
today) I see the following record structure:<br>
<br>
Nr Length Description<br>
1  8      BLZ (Bankleitzahl)<br>
2  1      Specification whether the institution is the bank sort code-carrying payment service provider ("1") or not ("2")<br>
3  58     Name of institution<br>
4  5      Zip Code<br>
5  35     Location/City<br>
6  27     Shortname of Institution<br>
7  5      PAN (I don't know what that is used for)<br>
8  11     BIC (SWIFT Bank Identifier Code - I think we should have that in the DB somehow)<br>
9  2      Check-Method<br>
10 6      Record number<br>
11 1      Change Operation<br>
          I see 'A', 'D', 'M' and 'U' and can think that they mean<br>
          'Add', 'Delete', 'Modified', 'Unchanged' but that is my interpretation which needs to be verified<br>
12 1      BLZ deletion if "1"<br>
13 8      Indicator of successor bank sort code (new BLZ)<br>
<br>
I simply copied the description of fields 2 and 13 from<br>
<a href="https://www.bundesbank.de/en/tasks/payment-systems/services/bank-sort-codes/download-bank-sort-codes-626218" rel="noreferrer" target="_blank">https://www.bundesbank.de/en/tasks/payment-systems/services/bank-sort-codes/download-bank-sort-codes-626218</a><br>
so that you can read up on it.<br>
<br>
The field you are looking for is contained as field #9.  To me it looks like the parser in <br>
AccountNumberCheck::readFile(const string &filename) needs to be changed/adopted to the<br>
current format.<br>
<br>
> How should I handle<br>
> this field with the database?<br>
<br>
I'd say extract it from field #9. The values map to the functions located in src/lib/methods.cc.<br>
<br>
> Inserting an empty string works but then should I also make a place for a<br>
> possible method field in the<br>
> user-supplied DB?<br>
<br>
It may work but can yield false results. I don't know the details, but looking at the code<br>
there is some heuristic going on to find a method if none is supplied. Again, I have not<br>
looked into that in detail and I am not aware of the detailed procedure.<br>
<br>
All I can say is that if you stick an account number into the check algorithm you must get a positive<br>
result, otherwise the account number is not valid for the BLZ (method_09 being the easiest one ;) ).<br>
<br>
Hope that helps. If you still have questions feel free to ask.<br>
<br>
-- <br>
<br>
Regards<br>
<br>
Thomas Baumgart<br>
<br>
<a href="https://www.signal.org/" rel="noreferrer" target="_blank">https://www.signal.org/</a>       Signal, the better WhatsApp<br>
-------------------------------------------------------------<br>
Testing can only prove the presence of bugs, not their absence.<br>
 -- Edsger W. Dijkstra, 1969<br>
-------------------------------------------------------------<br>
</blockquote></div>