Case Study 1: GlobalBank Transaction Statistical Analysis

Background

GlobalBank's compliance department requires daily statistical monitoring of all customer transactions. Federal regulations mandate that the bank flag unusual transaction patterns for review. Maria Chen's team was tasked with building an automated statistical analysis module that runs as part of the nightly batch cycle.

The Problem

Previously, transaction statistics were computed by a downstream SAS job that ran hours after the batch completed. The compliance team needed near-real-time results embedded in the batch process itself. The SAS license also cost $200,000/year, and management questioned whether COBOL could perform the same calculations natively.

Solution

Priya Kapoor demonstrated that COBOL's intrinsic statistical functions (MEAN, MEDIAN, STANDARD-DEVIATION, MIN, MAX, RANGE) could replace the SAS-based analysis for the core statistical metrics. The COBOL solution:

  1. Loads the day's transactions into a 50,000-entry table
  2. Computes descriptive statistics using intrinsic functions
  3. Flags transactions exceeding 3 standard deviations from the mean
  4. Computes account-level statistics for high-value accounts
  5. Produces a compliance report with all required metrics

Key Design Decisions

  • FUNCTION MEAN and STANDARD-DEVIATION replace hand-coded accumulator-and-divide patterns
  • FUNCTION ORD-MAX identifies the account with the largest single transaction for special reporting
  • FUNCTION PRESENT-VALUE computes risk-adjusted exposure for large transaction sequences
  • For partially loaded tables, the team used explicit loops rather than the ALL subscript to avoid zero-entry dilution

Results

The COBOL statistical module completed in 4 minutes for 50,000 transactions — faster than the SAS job's 15 minutes. All statistical results matched the SAS output to 4 decimal places. The SAS license was not renewed for the transaction monitoring use case.

Discussion Questions

  1. For what types of statistical analysis would COBOL's built-in functions be insufficient, requiring an external tool like SAS or Python?
  2. How would you handle the MEDIAN calculation for a dataset larger than the maximum table size?
  3. What are the precision implications of using COBOL's packed decimal arithmetic vs. floating-point for statistical calculations?
  4. How should the team validate that the COBOL statistical results remain accurate as data volumes grow?