Skip to main content

Theme Settings

Layout Style




Extracting Data from the EMV Participant Acquirer Activity and Participant Issuer Activity files


Every day EMV sends the Acquirer and Issuer Activity files which have to be imported into the Banks systems for reconciliation. The number of records can be a few thousands or a million based on the Banks ATM usage and has to be processed and reconciled quickly so that card management systems can be updated with the card balances

Though the file is in ASCII format it contains Title Headers, Column headers and a summary section making it difficult to extract the relevant information. However if you use the right tools you could extract about 20000 records in a second. We'll use sed on linux to achieve that in three steps

  • Extract all lines starting with the date. I found that 000000000000 occurs in all lines so the command so we extract it using the following command and write it to dates.txt
  • sed -n '/000000000000/p' aqcuirerfile.txt > dates.txt
  • Extract all lines with the card number. I used the following. (Not a very elegant Regex to match 16 digit card numbers)
  • sed -n '/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/p' acquirerfile.txt > card.txt
  • Concatenate the two files dates.txt and card.txt
  • Before concatenating we need to check if the number of lines in both the files are the same so we use wc -l dates.txt wc -l card.txt If there are same number of lines in both the files it means that the extraction is correct and we can concatenate the two using the following paste -d" " card.txt dates.txt > EMV.txt
  • Remove the line breaks from every odd line using the paste command

Leave a comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Get the latest in Fintech

Subscribe to our online newspaper dedicated to Financial Technology