EFT files with totals in file header



VIP Member
Hi Everybody,
I have received the technical specifications from a local bank for their requested EFT format.
Most bank files I have worked with contain a header, detail and total section. The total section displays the grand total and the number of invoices paid.

The requirement for this format is that the header line contains the grand total and number of invoices paid.

Standard R04572 (and most (all?) derivatives) read the database sequentially and accumulate the totals. Is anybody aware of an R04572 derivative that calculates the grand totals first and then writes the detail lines? I could use that particular UBE as a starting point for development instead of trying to mod R04572.

Apologies for posting this thread in two forums as the subject is functional as well as technical.

TIA for any suggestions,
I've come across this requirement a few times. I believe in general I created a modified R04572 to output to a temp table or cache, and then at the very end read back through and create the EFT file.
If you use a simple line number with decimals as part of the key, to give you the correct sequence when you read it back in (i.e. write all the details with line numbers 1.1, 1.2, 1.n, total line at 1.n+1, and then the header line at 1.0).

For Australia, I was able to use R04572OZ as a base being fairly close to what NAB required, though I don't recall the header having a total being a requirement for them.
Thanks David,
In absence of a standard derivative I was thinking exactly along those lines. The standard domestic NAB format complies to R04572OZ, but their FX transaction template is completely different :-(
What is FX? We do some international payments via NAB Connect, for which I wrote another custom UBE, loosely based off R04572OZ.
There does seem to be scope for multiple "55 Payment Leg" records for each "03 Payment Record", but we would not be making multiple payments to the same supplier in the same run.

At any rate, the standard process uses BSFN N0000207 InsertTextFileProcessorDetail to insert to F007111, you could perhaps keep track of the key (GPBT, GPTN, LIN) and update it when the data is available, or create a NER BSFN to do this (similar to UpdateTextFileProcessorHeader)
My First Response - "Who the heck is this bank, that they don't do things 'logically'?"

David is spot on. Write to a work table, then re-read the data several times (First, all records for the Summary. Then present Detail...)