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:- Preview the latest clearing extract without loading the entire file
- Count the total number of transactions
- Join clearing records with a PostgreSQL merchant reference table to enrich transactions with merchant names and categories
- 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.

