Card clearing and settlement is a core process in payment networks. Acquirers and issuers exchange transaction records — typically stored as fixed-length EBCDIC files on mainframes — to reconcile purchases, refunds, and chargebacks across the network. Migrating this workflow off the mainframe usually requires months of ETL development: decoding COBOL copybooks, mapping packed-decimal fields, joining with modern reference data, and validating totals. With Prometheux, the same pipeline can be expressed in a handful of Vadalog rules that read the mainframe extract directly and join it with data already living in modern systems.

The Scenario

A payment processor maintains daily clearing files on an IBM mainframe. Each record contains the card number, merchant ID, transaction amount (COMP-3 packed decimal), currency code, and an authorization code. The operations team wants to:
  1. Preview the latest clearing extract without loading the entire file
  2. Count the total number of transactions
  3. Join clearing records with a PostgreSQL merchant reference table to enrich transactions with merchant names and categories
  4. Flag high-value transactions for compliance review

The Copybook

The clearing file uses a standard fixed-length layout:

Step 1: Preview and Count

Before running the full pipeline, preview the first few records and get a total count — both expressed as SQL over the COBOL bind. The file is read once by the COBOL connector, and Spark executes the SQL in memory:

Step 2: Enrich with Modern Reference Data

Join the mainframe clearing records with a PostgreSQL merchant table to add merchant names and MCC categories. The SQL query spans two data sources — Prometheux handles the cross-source join transparently:

Step 3: Flag High-Value Transactions

Combine SQL for initial filtering with Vadalog rules for compliance logic. Transactions above a threshold are flagged, and recursive rules propagate alerts to related cards:

Why This Matters

The mainframe file never needs to be manually converted, staged, or pre-processed. Prometheux reads it natively, applies SQL and Vadalog rules, and joins it with data from PostgreSQL, Neo4j, CSV, or any other connected source — all in a single program.