RASIT · DEV · DEFENSE
Back to selected work

Mainframe batch system

LedgerGuard z/OS

A COBOL batch reconciliation system that validates synthetic banking movements, updates VSAM balances, and produces deterministic rejection, audit, and summary outputs.

Editorial illustration of the LedgerGuard validation, reconciliation, audit, and reporting batch flow
Role

Architecture, COBOL development, JCL, testing, and documentation

Year

2026

Status

Validated on IBM Z Xplore

Stack

COBOL · JCL · VSAM KSDS · ICETOOL / DFSORT

01

The problem

A financial batch must reject malformed or inconsistent input before balances change, apply valid movements only once, and leave enough evidence to explain every decision. The challenge was to make those guarantees explicit across records, return codes, persisted state, and reruns.

02

My contribution

I designed the fixed-width contracts and return-code policy, implemented the validation, reconciliation, and reporting programs in COBOL, orchestrated the flow with JCL and ICETOOL, prepared VSAM and GDG storage, and documented reproducible local and z/OS verification.

03

The solution

A staged daily job detects duplicate transaction identifiers, validates header-detail-trailer integrity, reconciles accepted entries against a VSAM account file, and writes separate audit, rejection, and summary outputs. Batch and transaction identifiers make reruns safe instead of silently applying a movement twice.

04

Batch architecture

Each stage has a narrow responsibility and a visible return-code contract, so business rejections do not become technical failures.

Key decisions

  • Amounts use integer cents at the boundaries and packed decimal internally, avoiding floating-point arithmetic.
  • Return codes distinguish success, business rejections, invalid batches, and technical errors: 0, 4, 8, and 12.
  • Portable business rules compile with GnuCOBOL in CI while z/OS-specific adapters remain isolated.

Integrity and data controls

  • All fixtures are synthetic and contain no real IBANs, cards, customers, or credentials.
  • Batch and transaction idempotency prevent a successful movement from being applied twice on rerun.
  • Published spool extracts remove the personal Z-ID, host, and dataset qualifiers before they become evidence.

Validation

  • IBM Enterprise COBOL 6.5 compiled the three programs on IBM Z Xplore and the setup and reset jobs completed with CC 0000.
  • The base daily run completed with the expected CC 0004: three accepted movements and six documented business rejections.
  • A safe rerun accepted zero movements, rejected all nine as an already processed batch, and produced no duplicate audit entries.
  • Eight deterministic local test groups compare generated outputs with expected files using GnuCOBOL.
05

Public evidence

The repository separates reproducible source and tests from sanitized execution evidence, and states clearly which optional capabilities were not deployed.

Next case studyRuta