During a mainframe exit you have three ways to keep PostgreSQL current with Db2 for z/OS: scheduled full-load refreshes, log-based change data capture (CDC), or application-level sync. AWS DMS alone won’t do the CDC part. Its documentation says that with Db2 for z/OS as a source, only full-load tasks are supported and CDC isn’t. So for large, busy tables you’ll need a CDC product that reads the Db2 log, such as IBM Data Replication, Qlik Replicate or Striim. Each one needs DATA CAPTURE CHANGES on the source tables and some setup or privileges on the mainframe. For smaller tables, a scheduled refresh through a Db2 Connect gateway is simpler and often good enough.
This goes deeper on one section of our earlier post, moving Db2, IMS and VSAM to PostgreSQL. Read that first for data conversion and reconciliation basics.
Why can’t AWS DMS do CDC from Db2 for z/OS?
It’s a documented limitation. The AWS DMS Db2 for z/OS source page lists: “Only Full Load replication tasks are supported. Change data capture (CDC) isn’t supported.” Parallel load isn’t supported either, and the source needs an IBM ODBC Connect license.
AWS’s own answer, in a Sept 30 database blog post, is a full load plus periodic full-load refresh: an EC2 instance running IBM Db2 Connect acts as a gateway to the mainframe, and scheduled DMS tasks (triggered by Lambda) reload the target. On an AWS re:Post question from October asking how to set up Db2 z/OS CDC with DMS, the only answer so far, generated by AWS’s AI assistant, points to the same refresh pattern.
What are the change data capture options for Db2 for z/OS?
| Option | How it captures changes | Mainframe-side requirements (per vendor docs) |
|---|---|---|
| Scheduled full-load refresh (AWS DMS + Db2 Connect gateway) | Reloads tables on a schedule; no change capture | SELECT access and an IBM ODBC Connect license; reload load on Db2 |
| IBM Data Replication, Db2 for z/OS remote source | Reads the Db2 log through IFI 306; the engine runs off the mainframe (Linux, AIX or Windows) | Db2 12 or 13; a started task (recommended for new deployments) or stored procedure to read the log, with WLM and APF authorization for the stored procedure route |
| Qlik Replicate | A Qlik-supplied user-defined table function on z/OS reads the log via IFI 306 | Install the R4Z component on z/OS (matched to the Replicate release), MONITOR2 privilege, DATA CAPTURE CHANGES on each table, possible DSNZPARM LOB limit changes |
| Striim | Initial load, then continuous replication through a Striim Agent for Db2 for z/OS | Db2 12 or 13; Striim notes its Striim Cloud CDC for Db2 z/OS currently runs on Google Cloud |
| Application-level sync | Batch extracts using timestamps or change flags already in the data | Depends on the data model; no log reader |
Other commercial CDC products also support Db2 for z/OS. Check each vendor’s current documentation for supported Db2 versions and PostgreSQL targets before you shortlist.
What does log-based CDC cost you on the mainframe?
Plan for these before you pick a product:
DATA CAPTURE CHANGESon every captured table. IBM’s replication docs say it makes Db2 log changes in the expanded format replication needs, and that it adds “a small amount of extra logging.” On Db2 for z/OS 9 and later, IBM’s own replication also requires it on some catalog tables. Some tools set it for you if given ALTER privilege.- Log retention. CDC reads from the active and archive logs. If the reader falls behind longer than you retain logs, you need a fresh full load.
- Mainframe software and privileges. Started tasks, stored procedures or table functions; IFI privileges such as MONITOR2; WLM environments. Your z/OS systems programmers and DBAs have to install and run these, so get them involved early.
- CPU (MIPS). Log reading and any refresh queries consume mainframe CPU, which can affect your software bill. Measure in a test environment rather than relying on vendor estimates.
- Licensing. CDC products are licensed separately, and the AWS route needs an IBM ODBC Connect license. Get quotes for the length of the parallel run, not just the migration.
- Data quirks. EBCDIC code pages, packed decimals and features such as FIELDPROC need checking. IBM’s FAQ notes its remote source engine doesn’t currently recognize FIELDPROC fields during mirroring.
Planning a Db2 for z/OS exit and need both systems in sync for months? Book a call and we’ll help you choose an approach and plan the parallel run.
When is a scheduled refresh good enough?
More often than people expect. A refresh works when:
- The table can be reloaded comfortably inside your batch window.
- The PostgreSQL side is read-only during the parallel run, used for reporting, testing or new services that can tolerate data a few hours old.
- You’re comparing outputs batch by batch rather than transaction by transaction.
Use log-based CDC when tables are too big to reload, when consumers need data within minutes, or when the new system starts taking writes for some functions before the mainframe is retired.
Many projects mix the two: CDC for the handful of large, hot tables, and refresh for the rest.
How do you reconcile while both systems run?
- Decide the system of record for each table for each phase of the parallel run, and write it down.
- Compare control totals and checksums per table and per batch cycle: counts, sums of amounts, hash totals.
- Monitor CDC lag and alert when it grows, before it outruns log retention.
- Diff outputs of the same batch jobs on both sides, after normalizing encoding and sort order.
- Rehearse cutover and rollback, including how you would stop CDC, run a final sync and switch.
Our verification guide for translated COBOL covers the reconciliation steps in more detail, and our mainframe migration services cover planning and running the parallel period.
FAQ
Does AWS DMS support CDC from Db2 for z/OS?
No. AWS documents that only full-load tasks are supported from Db2 for z/OS. AWS’s own pattern uses scheduled full-load refreshes through a Db2 Connect gateway on EC2.
What is DATA CAPTURE CHANGES in Db2 for z/OS?
A table attribute that makes Db2 log full row images for changes, which log-based replication needs. IBM says it adds a small amount of extra logging.
Which tools can capture changes from Db2 for z/OS to PostgreSQL?
Log-based products such as IBM Data Replication, Qlik Replicate and Striim support Db2 for z/OS as a source. Confirm PostgreSQL target support and versions with each vendor.
Does CDC from Db2 for z/OS use mainframe CPU?
Yes. Reading the log and running refresh queries use mainframe resources. Measure it in a test environment before you budget.
How long should Db2 and PostgreSQL run in parallel?
Long enough to cover every business cycle that matters, such as month-end and any quarter-end or year-end jobs in scope. Agree on the exit criteria before you start.
Where to go from here
Check which tables are small enough to refresh, use log-based CDC for the rest, involve your z/OS team early on DATA CAPTURE CHANGES, log retention and CPU, and reconcile every cycle. If you’d like help planning it, book a call.