The Insurance Management System (INSMASTR) employs a hybrid integration architecture combining sequential file processing with relational database persistence. The system interfaces with upstream and downstream systems through eight sequential files and maintains persistent state in DB2 database tables. All integration points follow batch processing patterns typical of mainframe environments, with no real-time or online transaction processing capabilities.
The system operates on a batch-oriented integration model with the following characteristics:
The system supports four distinct processing modes controlled via JCL PARM parameter:
| Mode | PARM Value | Files Processed | Description |
|---|---|---|---|
| Policy Only | POLICY | POLICY-IN, POLICY-OUT | Process new policy applications only |
| Renewal Only | RENEWAL | RENEWAL-IN, RENEWAL-OUT | Process policy renewals only |
| Claims Only | CLAIM | CLAIM-IN, CLAIM-OUT | Process insurance claims only |
| All Files | ALL | All input/output files | Process all three transaction types sequentially |
The system processes eight sequential files organized into three input files, three output files, one error file, and one reporting file. All files use fixed-length record formats with sequential organization and access patterns optimized for mainframe batch processing.
┌──────────────────────────────────────────────────────────────────┐
│ FILE INTEGRATION ARCHITECTURE │
└──────────────────────────────────────────────────────────────────┘
UPSTREAM SYSTEMS INSMASTR PROGRAM DOWNSTREAM SYSTEMS
┌─────────────────┐ ┌──────────────┐ ┌─────────────────┐
│ Policy System │──────────────┤ POLICY-IN │ │ │
│ │ 800 bytes │ (POLFILE) │ │ │
└─────────────────┘ └──────────────┘ │ │
│ │ │
▼ │ │
┌─────────────────┐ ┌──────────────┐ │ │
│ Renewal System │──────────────┤ RENEWAL-IN │ │ │
│ │ 600 bytes │ (RENFILE) │ │ │
└─────────────────┘ └──────────────┘ │ │
│ │ │
▼ │ │
┌─────────────────┐ ┌──────────────┐ │ │
│ Claims System │──────────────┤ CLAIM-IN │ │ │
│ │ 900 bytes │ (CLMFILE) │ │ │
└─────────────────┘ └──────────────┘ │ │
│ │ │
▼ │ │
┌────────────────┐ │ │
│ PROCESSING │ │ │
│ VALIDATION │ │ │
│ CALCULATION │ │ │
│ DB2 OPS │ │ │
└────────────────┘ │ │
│ │ │
┌───────────────────┼───────────────────┐ │ │
▼ ▼ ▼ │ │
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ POLICY-OUT │ │ RENEWAL-OUT │ │ CLAIM-OUT │ │
│ (POLOUT) │───▶│ (RENOUT) │──▶│ (CLMOUT) │───────────▶│ Processing
│ 500 bytes │ │ 500 bytes │ │ 500 bytes │ │ Systems
└──────────────┘ └──────────────┘ └──────────────┘ │
│ │
▼ │
┌──────────────┐ │
│ ERROR-FILE │───────────────────────────────▶│ Error
│ (ERRFILE) │ │ Management
│ 250 bytes │ │
└──────────────┘ │
│ │
▼ │
┌──────────────┐ │
│ REPORT-FILE │───────────────────────────────▶│ Reporting
│ (RPTFILE) │ │ Systems
│ 133 bytes │ │
└──────────────┘ │
│
└───────────────┘
| Attribute | Value |
|---|---|
| DD Name | POLFILE |
| Interface Type | Sequential file input |
| Direction | Input (from upstream policy management system) |
| Record Length | 800 bytes (fixed) |
| Organization | Sequential |
| Access Mode | Sequential |
| Recording Mode | Fixed (F) |
| Block Size | System-determined (BLOCK CONTAINS 0) |
| Processing Frequency | Daily/Weekly batch (schedule-dependent) |
The policy input file contains new insurance policy applications with comprehensive customer and policy information:
Record Types:
Key Data Elements:
| Attribute | Value |
|---|---|
| DD Name | RENFILE |
| Interface Type | Sequential file input |
| Direction | Input (from upstream renewal management system) |
| Record Length | 600 bytes (fixed) |
| Organization | Sequential |
| Access Mode | Sequential |
| Recording Mode | Fixed (F) |
| Block Size | System-determined |
| Processing Frequency | Monthly/Quarterly batch (policy renewal cycle) |
The renewal input file contains policy renewal requests for existing customers:
Record Types:
Key Data Elements:
| Attribute | Value |
|---|---|
| DD Name | CLMFILE |
| Interface Type | Sequential file input |
| Direction | Input (from upstream claims processing system) |
| Record Length | 900 bytes (fixed) |
| Organization | Sequential |
| Access Mode | Sequential |
| Recording Mode | Fixed (F) |
| Block Size | System-determined |
| Processing Frequency | Daily batch (high frequency for claims) |
The claims input file contains insurance claim submissions with comprehensive claim details:
Record Types:
Key Data Elements:
Claims processing includes sophisticated fraud detection with database queries:
| Attribute | Value |
|---|---|
| DD Name | POLOUT |
| Interface Type | Sequential file output |
| Direction | Output (to downstream policy management system) |
| Record Length | 500 bytes (fixed) |
| Organization | Sequential |
| Access Mode | Sequential |
| Recording Mode | Fixed (F) |
| Block Size | System-determined |
| Processing Frequency | Same as input processing frequency |
The policy output file contains successfully processed policy records with calculated premium and assigned policy numbers:
Output Data Elements:
| Attribute | Value |
|---|---|
| DD Name | RENOUT |
| Interface Type | Sequential file output |
| Direction | Output (to downstream renewal confirmation system) |
| Record Length | 500 bytes (fixed) |
| Organization | Sequential |
| Access Mode | Sequential |
| Recording Mode | Fixed (F) |
| Block Size | System-determined |
| Processing Frequency | Same as renewal input processing |
The renewal output file contains successfully processed renewal records:
Output Data Elements:
| Attribute | Value |
|---|---|
| DD Name | CLMOUT |
| Interface Type | Sequential file output |
| Direction | Output (to downstream claims payment system) |
| Record Length | 500 bytes (fixed) |
| Organization | Sequential |
| Access Mode | Sequential |
| Recording Mode | Fixed (F) |
| Block Size | System-determined |
| Processing Frequency | Same as claims input processing |
The claims output file contains successfully processed claim records with payment decisions:
Output Data Elements:
| Attribute | Value |
|---|---|
| DD Name | ERRFILE |
| Interface Type | Sequential file output |
| Direction | Output (to error management/monitoring system) |
| Record Length | 250 bytes (fixed) |
| Organization | Sequential |
| Access Mode | Sequential |
| Recording Mode | Fixed (F) |
| Block Size | System-determined |
| Processing Frequency | Continuous (written as errors occur) |
The error file captures all processing errors with detailed diagnostic information:
Error Record Format:
ERROR|<error-code>|<severity>|<error-message>|SQLCODE=<sqlcode>|<timestamp>
Data Elements:
| Range | Severity | Category |
|---|---|---|
| 1101-1999 | CRITICAL | File open errors, DB2 connection failures |
| 2001-2999 | SEVERE | Policy processing errors |
| 3001-3999 | SEVERE | Renewal processing errors |
| 4001-4999 | SEVERE | Claims processing errors |
| Other | WARNING | Validation warnings, non-critical errors |
| Attribute | Value |
|---|---|
| DD Name | RPTFILE |
| Interface Type | Sequential file output with print formatting |
| Direction | Output (to reporting system or SYSOUT for printing) |
| Record Length | 133 bytes (1 byte carriage control + 132 data) |
| Organization | Sequential |
| Access Mode | Sequential |
| Recording Mode | Fixed Block ANSI (FBA) |
| Block Size | System-determined |
| Processing Frequency | One report per batch execution |
The report file contains formatted processing statistics and summary information:
Report Structure:
Header Section:
Detail Section:
Summary Section:
Carriage Control Characters:
The Insurance Management System integrates with DB2 for z/OS using embedded SQL through the DB2 precompiler. The database serves as the system of record for all insurance entities and maintains referential integrity across policies, customers, claims, and providers.
| Attribute | Value |
|---|---|
| Database Name | INSPROD |
| Connection Method | Embedded SQL (EXEC SQL...END-EXEC) |
| User ID | INSMASTR (program name) |
| Isolation Level | CS (Cursor Stability) |
| Lock Timeout | 30 seconds |
| Precompiler | DB2 Precompiler (DSNHPC) |
| Communication Area | SQLCA (SQL Communication Area) |
| Connection Mode | Explicit CONNECT at initialization |
| Disconnection | Explicit CONNECT RESET at finalization |
┌─────────────────────────────────────────────────────────────┐
│ DB2 CONNECTION LIFECYCLE │
└─────────────────────────────────────────────────────────────┘
1000-INITIALIZE-PROGRAM
│
├─► 1200-CONNECT-DB2
│ ├─► EXEC SQL CONNECT TO INSPROD USER :WS-PROGRAM-NAME
│ ├─► Check SQLCODE (must be 0 for success)
│ ├─► Set isolation level CS
│ ├─► Set lock timeout 30 seconds
│ └─► Display connection confirmation
│
▼
[PROCESSING PHASE]
│
├─► Policy Processing (2000 series)
│ ├─► SELECT (duplicate check)
│ ├─► MERGE (customer)
│ ├─► INSERT (policy)
│ └─► COMMIT (every 500 records)
│
├─► Renewal Processing (3000 series)
│ ├─► SELECT (existing policy)
│ ├─► INSERT (new policy)
│ ├─► UPDATE (old policy)
│ └─► COMMIT (every 500 records)
│
├─► Claims Processing (4000 series)
│ ├─► SELECT (policy, provider, fraud checks)
│ ├─► INSERT (claim)
│ ├─► UPDATE (policy usage)
│ └─► COMMIT (every 500 records)
│
▼
9000-FINALIZE-PROGRAM
│
├─► 7000-COMMIT-WORK (final commit)
│ └─► EXEC SQL COMMIT WORK
│
└─► 9300-DISCONNECT-DB2
├─► EXEC SQL RELEASE ALL
├─► EXEC SQL CONNECT RESET
└─► Check SQLCODE
Purpose: Master table for all insurance policies (active, renewed, expired)
Primary Operations:
Key Fields:
SQL Operations:
SELECT COUNT(*)
INTO :WS-DUPLICATE-COUNT
FROM POLICY_TABLE
WHERE CUSTOMER_NUMBER = :POL-CUSTOMER-NUMBER
AND INSURANCE_TYPE = :POL-INSURANCE-TYPE
AND POLICY_STATUS = 'ACTIVE'
INSERT INTO POLICY_TABLE
(POLICY_NUMBER, CUSTOMER_NUMBER, CUSTOMER_NAME,
INSURANCE_TYPE, POLICY_START_DATE, POLICY_END_DATE,
POLICY_TERM_MONTHS, POLICY_STATUS,
COVERAGE_AMOUNT, DEDUCTIBLE_AMOUNT, DEDUCTIBLE_MET,
OUT_OF_POCKET_MAX, OUT_OF_POCKET_MET,
PREMIUM_AMOUNT, PAYMENT_FREQUENCY, PAYMENT_METHOD,
RISK_SCORE, FRAUD_SCORE, CLAIMS_COUNT, RENEWAL_COUNT,
CREATED_DATE, CREATED_BY)
VALUES
(:HV-POLICY-NUMBER, :HV-CUSTOMER-NUMBER, :HV-CUSTOMER-NAME,
:HV-INSURANCE-TYPE, :HV-POLICY-START-DATE, :HV-POLICY-END-DATE,
:HV-POLICY-TERM-MONTHS, 'ACTIVE',
:HV-COVERAGE-AMOUNT, :HV-DEDUCTIBLE-AMOUNT, 0,
:HV-OUT-OF-POCKET-MAX, 0,
:HV-PREMIUM-AMOUNT, :HV-PAYMENT-FREQUENCY, :HV-PAYMENT-METHOD,
:HV-RISK-SCORE, 0, 0, 0,
CURRENT_TIMESTAMP, :WS-PROGRAM-NAME)
SELECT CUSTOMER_NUMBER, CUSTOMER_NAME, INSURANCE_TYPE,
COVERAGE_AMOUNT, PREMIUM_AMOUNT, DEDUCTIBLE_AMOUNT,
POLICY_STATUS, POLICY_END_DATE, RISK_SCORE,
CLAIMS_COUNT, RENEWAL_COUNT
INTO :HV-CUSTOMER-NUMBER, :HV-CUSTOMER-NAME, :HV-INSURANCE-TYPE,
:HV-COVERAGE-AMOUNT, :HV-PREMIUM-AMOUNT, :HV-DEDUCTIBLE-AMOUNT,
:HV-POLICY-STATUS, :HV-POLICY-END-DATE, :HV-RISK-SCORE,
:HV-CLAIMS-COUNT, :HV-RENEWAL-COUNT
FROM POLICY_TABLE
WHERE POLICY_NUMBER = :REN-POLICY-NUMBER
UPDATE POLICY_TABLE
SET POLICY_STATUS = 'RENEWED',
RENEWAL_TO_POLICY = :HV-POLICY-NUMBER,
LAST_UPDATE_DATE = CURRENT_TIMESTAMP,
UPDATED_BY = :WS-PROGRAM-NAME
WHERE POLICY_NUMBER = :REN-POLICY-NUMBER
UPDATE POLICY_TABLE
SET DEDUCTIBLE_MET = DEDUCTIBLE_MET + :WS-DEDUCTIBLE-APPLIED,
OUT_OF_POCKET_MET = OUT_OF_POCKET_MET + :WS-PATIENT-PAYS,
CLAIMS_COUNT = CLAIMS_COUNT + 1,
LAST_CLAIM_DATE = CURRENT_DATE,
LAST_UPDATE_DATE = CURRENT_TIMESTAMP,
UPDATED_BY = :WS-PROGRAM-NAME
WHERE POLICY_NUMBER = :CLM-POLICY-NUMBER
Purpose: Repository for all insurance claims with payment decisions and fraud analysis
Primary Operations:
Key Fields:
SQL Operations:
SELECT COUNT(*)
INTO :WS-DUPLICATE-COUNT
FROM CLAIM_TABLE
WHERE CLAIM_NUMBER = :CLM-CLAIM-NUMBER
SELECT COUNT(*)
INTO :WS-ROW-COUNT
FROM CLAIM_TABLE
WHERE CUSTOMER_NUMBER = :CLM-CUSTOMER-NUMBER
AND CLAIM_DATE >= CURRENT_DATE - 30 DAYS
SELECT COUNT(*)
INTO :WS-ROW-COUNT
FROM CLAIM_TABLE
WHERE CUSTOMER_NUMBER = :CLM-CUSTOMER-NUMBER
AND CLAIM_TYPE = :CLM-CLAIM-TYPE
AND CLAIM_AMOUNT = :CLM-CLAIM-AMOUNT
AND CLAIM_DATE >= CURRENT_DATE - 90 DAYS
INSERT INTO CLAIM_TABLE
(CLAIM_ID, CLAIM_NUMBER, POLICY_NUMBER, CUSTOMER_NUMBER,
CLAIM_TYPE, INCIDENT_DATE, CLAIM_DATE,
CLAIM_AMOUNT, APPROVED_AMOUNT,
DEDUCTIBLE_APPLIED, COPAY_APPLIED, COINSURANCE_APPLIED,
INSURANCE_PAID, PATIENT_RESPONSIBILITY,
CLAIM_STATUS, APPROVAL_STATUS, PAYMENT_STATUS,
PROVIDER_CODE, PROVIDER_NAME,
DIAGNOSIS_CODE, PROCEDURE_CODE,
FRAUD_FLAG, FRAUD_SCORE, INVESTIGATION_FLAG,
CREATED_DATE, CREATED_BY)
VALUES
(:HV-CLAIM-ID, :CLM-CLAIM-NUMBER, :CLM-POLICY-NUMBER, :CLM-CUSTOMER-NUMBER,
:CLM-CLAIM-TYPE, :CLM-INCIDENT-DATE, :CLM-CLAIM-DATE,
:CLM-CLAIM-AMOUNT, :WS-APPROVED-AMOUNT,
:WS-DEDUCTIBLE-APPLIED, :WS-COPAY-AMOUNT, :WS-COINSURANCE-AMOUNT,
:WS-INSURANCE-PAYS, :WS-PATIENT-PAYS,
:HV-CLAIM-STATUS, :HV-APPROVAL-STATUS, :HV-PAYMENT-STATUS,
:CLM-PROVIDER-CODE, :CLM-PROVIDER-NAME,
:CLM-DIAGNOSIS-CODE, :CLM-PROCEDURE-CODE,
:HV-FRAUD-FLAG, :WS-FRAUD-SCORE, :HV-INVESTIGATION-FLAG,
CURRENT_TIMESTAMP, :WS-PROGRAM-NAME)
Purpose: Master customer repository with demographics and risk profile
Primary Operations:
Key Fields:
SQL Operations:
MERGE INTO CUSTOMER_TABLE AS C
USING (VALUES(
:POL-CUSTOMER-NUMBER,
:POL-CUSTOMER-NAME,
:POL-DATE-OF-BIRTH,
:POL-SSN,
:POL-GENDER,
:POL-MARITAL-STATUS,
:HV-CUST-ADDRESS,
:POL-PHONE-PRIMARY,
:POL-EMAIL,
'ACTIVE',
:HV-CUST-RISK-PROFILE,
0
)) AS S(
CUSTOMER_NUMBER, CUSTOMER_NAME, DOB, SSN, GENDER,
MARITAL_STATUS, ADDRESS, PHONE, EMAIL, STATUS,
RISK_PROFILE, CREDIT_SCORE
)
ON C.CUSTOMER_NUMBER = S.CUSTOMER_NUMBER
WHEN MATCHED THEN
UPDATE SET
CUSTOMER_NAME = S.CUSTOMER_NAME,
ADDRESS = S.ADDRESS,
PHONE = S.PHONE,
EMAIL = S.EMAIL,
LAST_UPDATE_DATE = CURRENT_TIMESTAMP,
UPDATED_BY = :WS-PROGRAM-NAME
WHEN NOT MATCHED THEN
INSERT (
CUSTOMER_NUMBER, CUSTOMER_NAME, DOB, SSN, GENDER,
MARITAL_STATUS, ADDRESS, PHONE, EMAIL, STATUS,
RISK_PROFILE, CREDIT_SCORE, FRAUD_ALERT,
CREATED_DATE, CREATED_BY
)
VALUES (
S.CUSTOMER_NUMBER, S.CUSTOMER_NAME, S.DOB, S.SSN, S.GENDER,
S.MARITAL_STATUS, S.ADDRESS, S.PHONE, S.EMAIL, S.STATUS,
S.RISK_PROFILE, S.CREDIT_SCORE, 'N',
CURRENT_TIMESTAMP, :WS-PROGRAM-NAME
)
Purpose: Healthcare and service provider registry with fraud scoring
Primary Operations:
Key Fields:
SQL Operations:
SELECT FRAUD_SCORE, ACTIVE_FLAG
INTO :HV-PROV-FRAUD-SCORE, :HV-PROV-ACTIVE-FLAG
FROM PROVIDER_TABLE
WHERE PROVIDER_CODE = :CLM-PROVIDER-CODE
The system uses DB2 sequences for generating unique identifiers:
Purpose: Generate unique policy numbers for new and renewal policies
Usage:
SELECT NEXT VALUE FOR POLICY_SEQ
INTO :WS-POLICY-NUMBER
FROM SYSIBM.SYSDUMMY1
Invoked in:
Purpose: Generate unique claim IDs for new claims
Usage:
SELECT NEXT VALUE FOR CLAIM_SEQ
INTO :WS-CLAIM-ID
FROM SYSIBM.SYSDUMMY1
Invoked in:
The program uses DCLGEN-style host variable structures for type-safe database integration. All host variables are defined in WORKING-STORAGE with naming convention HV-* (host variable prefix):
These structures use COBOL data types compatible with DB2 column types:
Commit Frequency: Every 500 records (configurable via WS-COMMIT-FREQUENCY constant)
Rationale:
Commit Logic (Lines 2852-2867):
7000-COMMIT-WORK SECTION.
EXEC SQL
COMMIT WORK
END-EXEC
IF SQLCODE NOT = 0
MOVE 'DB2 COMMIT FAILED' TO WS-ERROR-MESSAGE
MOVE 7001 TO WS-ERROR-CODE
PERFORM 8000-ERROR-HANDLER
ELSE
MOVE ZERO TO WS-COMMIT-COUNT
MOVE 'N' TO WS-COMMIT-FLAG
DISPLAY 'COMMIT SUCCESSFUL - RECORDS COMMITTED'
END-IF.
Automatic Rollback: Triggered on any database error (SQLCODE not 0 or 100)
Rollback Logic (Lines 2928-2933):
IF SQLCODE NOT = 0 AND SQLCODE NOT = 100
EXEC SQL
ROLLBACK WORK
END-EXEC
MOVE ZERO TO WS-COMMIT-COUNT
DISPLAY 'ROLLBACK EXECUTED DUE TO SQL ERROR'
END-IF
Impact:
Configuration (Lines 1040-1044):
EXEC SQL
SET CURRENT ISOLATION = CS
END-EXEC
Characteristics:
Configuration (Lines 1046-1050):
EXEC SQL
SET CURRENT LOCK TIMEOUT = 30
END-EXEC
Behavior:
While the Insurance Management System does not directly interface with external systems via APIs or middleware, it receives data from upstream systems through file-based integration. The following assumptions are made about upstream systems:
Assumed Characteristics:
Data Quality Expectations:
Assumed Characteristics:
Data Quality Expectations:
Assumed Characteristics:
Data Quality Expectations:
Consumes: POLICY-OUTPUT-FILE (POLOUT)
Expected Actions:
Interface Characteristics:
Consumes: RENEWAL-OUTPUT-FILE (RENOUT)
Expected Actions:
Interface Characteristics:
Consumes: CLAIMS-OUTPUT-FILE (CLMOUT)
Expected Actions:
Interface Characteristics:
Consumes: ERROR-FILE (ERRFILE)
Expected Actions:
Interface Characteristics:
Consumes: REPORT-FILE (RPTFILE)
Expected Actions:
Interface Characteristics:
Important Limitation: The Insurance Management System does not support:
Architectural Implications:
The Insurance Management System is invoked through Job Control Language (JCL) on z/OS, which controls:
PARM Specification:
The processing mode is specified via the PARM parameter in the JCL EXEC statement:
//RUNINS EXEC PGM=INSMASTR,PARM=''
Valid PARM Values:
POLICY - Process only policy input/outputRENEWAL - Process only renewal input/outputCLAIM - Process only claims input/outputALL - Process all three file types (default)Example: Process Only Policies
//POLRUN EXEC PGM=INSMASTR,PARM='POLICY'
//STEPLIB DD DSN=LOADLIB.PROD,DISP=SHR
// DD DSN=DSN1210.DSNLOAD,DISP=SHR
//POLFILE DD DSN=INPUT.POLICY,DISP=SHR
//POLOUT DD DSN=OUTPUT.POLICY,DISP=(NEW,CATLG),
// UNIT=SYSDA,SPACE=(TRK,(100,50),RLSE)
//ERRFILE DD DSN=OUTPUT.ERRORS,DISP=(NEW,CATLG),
// UNIT=SYSDA,SPACE=(TRK,(50,25),RLSE)
//RPTFILE DD SYSOUT=*
POLFILE (Policy Input):
//POLFILE DD DSN=,DISP=SHR
RENFILE (Renewal Input):
//RENFILE DD DSN=,DISP=SHR
CLMFILE (Claims Input):
//CLMFILE DD DSN=,DISP=SHR
POLOUT (Policy Output):
//POLOUT DD DSN=,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(100,50),RLSE),
// DCB=(LRECL=500,RECFM=FB,BLKSIZE=0)
RENOUT (Renewal Output):
//RENOUT DD DSN=,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(100,50),RLSE),
// DCB=(LRECL=500,RECFM=FB,BLKSIZE=0)
CLMOUT (Claims Output):
//CLMOUT DD DSN=,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(100,50),RLSE),
// DCB=(LRECL=500,RECFM=FB,BLKSIZE=0)
ERRFILE (Error Log):
//ERRFILE DD DSN=,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(50,25),RLSE),
// DCB=(LRECL=250,RECFM=FB,BLKSIZE=0)
RPTFILE (Processing Report):
//RPTFILE DD SYSOUT=*
//RPTFILE DD DSN=,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(10,5),RLSE),
// DCB=(LRECL=133,RECFM=FBA,BLKSIZE=0)
//INSMASTR JOB (ACCT),'INSURANCE PROC',
// CLASS=A,
// MSGCLASS=X,
// MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//*
//* INSURANCE MANAGEMENT SYSTEM - BATCH PROCESSING
//* PROCESSES POLICIES, RENEWALS, AND CLAIMS
//*
//STEP01 EXEC PGM=INSMASTR,
// PARM='ALL',
// REGION=4M,
// TIME=30
//*
//* PROGRAM LOAD LIBRARIES
//*
//STEPLIB DD DSN=PROD.LOADLIB,DISP=SHR
// DD DSN=DSN1210.DSNLOAD,DISP=SHR
// DD DSN=SYS1.COB2LIB,DISP=SHR
//*
//* INPUT FILES
//*
//POLFILE DD DSN=INS.POLICY.INPUT(&DATE),DISP=SHR
//RENFILE DD DSN=INS.RENEWAL.INPUT(&DATE),DISP=SHR
//CLMFILE DD DSN=INS.CLAIMS.INPUT(&DATE),DISP=SHR
//*
//* OUTPUT FILES - USING GDG FOR VERSION CONTROL
//*
//POLOUT DD DSN=INS.POLICY.OUTPUT(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(100,50),RLSE),
// DCB=(LRECL=500,RECFM=FB,BLKSIZE=0)
//RENOUT DD DSN=INS.RENEWAL.OUTPUT(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(100,50),RLSE),
// DCB=(LRECL=500,RECFM=FB,BLKSIZE=0)
//CLMOUT DD DSN=INS.CLAIMS.OUTPUT(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(100,50),RLSE),
// DCB=(LRECL=500,RECFM=FB,BLKSIZE=0)
//*
//* ERROR AND REPORT FILES
//*
//ERRFILE DD DSN=INS.ERROR.LOG(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(50,25),RLSE),
// DCB=(LRECL=250,RECFM=FB,BLKSIZE=0)
//RPTFILE DD SYSOUT=*
//*
//* SYSTEM OUTPUT
//*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
Estimated Processing Times:
Scheduling Recommendations:
Current Limitation: The system does not include explicit checkpoint/restart logic.
Recovery Approach:
Future Enhancement Recommendation: Implement checkpoint/restart using:
Supported Parallelism: Multiple job instances can run concurrently with different processing modes:
Example: Parallel Execution Strategy
//JOB1 EXEC PGM=INSMASTR,PARM='POLICY'
//JOB2 EXEC PGM=INSMASTR,PARM='RENEWAL'
//JOB3 EXEC PGM=INSMASTR,PARM='CLAIM'
Benefits:
Considerations:
┌───────────────────────────────────────────────────────────────────┐
│ POLICY PROCESSING INTEGRATION SEQUENCE │
└───────────────────────────────────────────────────────────────────┘
Upstream System POLFILE INSMASTR DB2 POLOUT Downstream System
│ │ │ │ │ │
│ Generate │ │ │ │ │
│ Policy File │ │ │ │ │
├─────────────────►│ │ │ │ │
│ │ │ │ │ │
│ [JCL Execution] │ │ │ │
│ │ Open │ │ │ │
│ │◄────────────┤ │ │ │
│ │ Connect │ │ │ │
│ │ ├───────────►│ │ │
│ │ │ CONNECT │ │ │
│ │ │ TO │ │ │
│ │ │ INSPROD │ │ │
│ │ │◄───────────┤ │ │
│ │ │ (Success) │ │ │
│ │ Read │ │ │ │
│ │ Record │ │ │ │
│ ├────────────►│ │ │ │
│ │ (800 B) │ │ │ │
│ │ │ Validate │ │ │
│ │ │ Input │ │ │
│ │ │ │ │ │
│ │ │ Check │ │ │
│ │ │ Duplicate │ │ │
│ │ ├───────────►│ │ │
│ │ │ SELECT │ │ │
│ │ │ COUNT │ │ │
│ │ │◄───────────┤ │ │
│ │ │ (No dup) │ │ │
│ │ │ │ │ │
│ │ │ Calculate │ │ │
│ │ │ Risk & │ │ │
│ │ │ Premium │ │ │
│ │ │ │ │ │
│ │ │ Get │ │ │
│ │ │ Policy# │ │ │
│ │ ├───────────►│ │ │
│ │ │ POLICY_SEQ│ │ │
│ │ │◄───────────┤ │ │
│ │ │ │ │ │
│ │ │ MERGE │ │ │
│ │ │ Customer │ │ │
│ │ ├───────────►│ │ │
│ │ │◄───────────┤ │ │
│ │ │ │ │ │
│ │ │ INSERT │ │ │
│ │ │ Policy │ │ │
│ │ ├───────────►│ │ │
│ │ │◄───────────┤ │ │
│ │ │ │ │ │
│ │ │ Write │ │ │
│ │ │ Output │ │ │
│ │ ├────────────┼──────────►│ │
│ │ │ │ (500 B) │ │
│ │ │ │ │ │
│ │ [Every 500 records] │ │ │
│ │ │ COMMIT │ │ │
│ │ ├───────────►│ │ │
│ │ │◄───────────┤ │ │
│ │ │ │ │ │
│ │ [Loop until EOF] │ │ │
│ │ │ │ │ │
│ │ EOF │ │ │ │
│ ├────────────►│ │ │ │
│ │ │ Final │ │ │
│ │ │ COMMIT │ │ │
│ │ ├───────────►│ │ │
│ │ │◄───────────┤ │ │
│ │ │ │ │ │
│ │ Close │ │ │ │
│ │◄────────────┤ │ │ Close │
│ │ │ │ ├─────────────►│
│ │ │ Disconnect │ │ │
│ │ ├───────────►│ │ │
│ │ │ CONNECT │ │ │
│ │ │ RESET │ │ │
│ │ │◄───────────┤ │ │
│ │ │ │ │ │
│ │ │ Write │ │ │
│ │ │ Report │ │ │
│ │ │ │ │ │
│ │ │ Return │ │ │
│ │ │ Code 0 │ │ │
│ │ │ │ │ Import │
│ │ │ │ │ Policies │
│ │ │ │ ├─────────────►│
│ │ │ │ │ │
┌───────────────────────────────────────────────────────────────────┐
│ CLAIMS PROCESSING INTEGRATION SEQUENCE (FRAUD CHECK) │
└───────────────────────────────────────────────────────────────────┘
Claims System CLMFILE INSMASTR DB2 CLMOUT Payment System
│ │ │ │ │ │
│ Generate │ │ │ │ │
│ Claims File │ │ │ │ │
├──────────────►│ │ │ │ │
│ │ │ │ │ │
│ [JCL Execution] │ │ │ │
│ │ Open │ │ │ │
│ │◄────────────┤ │ │ │
│ │ Connect │ │ │ │
│ │ ├───────────►│ │ │
│ │ │◄───────────┤ │ │
│ │ Read │ │ │ │
│ │ Claim │ │ │ │
│ ├────────────►│ │ │ │
│ │ (900 B) │ │ │ │
│ │ │ Validate │ │ │
│ │ │ Input │ │ │
│ │ │ │ │ │
│ │ │ Get │ │ │
│ │ │ Policy │ │ │
│ │ ├───────────►│ │ │
│ │ │ SELECT │ │ │
│ │ │ POLICY │ │ │
│ │ │◄───────────┤ │ │
│ │ │ │ │ │
│ │ │ Check │ │ │
│ │ │ Duplicate │ │ │
│ │ ├───────────►│ │ │
│ │ │ SELECT │ │ │
│ │ │ COUNT │ │ │
│ │ │◄───────────┤ │ │
│ │ │ (No dup) │ │ │
│ │ │ │ │ │
│ │ │ [FRAUD DETECTION] │ │
│ │ │ │ │ │
│ │ │ Frequency │ │ │
│ │ │ Check │ │ │
│ │ ├───────────►│ │ │
│ │ │ SELECT │ │ │
│ │ │ COUNT 30d │ │ │
│ │ │◄───────────┤ │ │
│ │ │ (+10 pts) │ │ │
│ │ │ │ │ │
│ │ │ Provider │ │ │
│ │ │ Check │ │ │
│ │ ├───────────►│ │ │
│ │ │ SELECT │ │ │
│ │ │ PROVIDER │ │ │
│ │ │◄───────────┤ │ │
│ │ │ (+20 pts) │ │ │
│ │ │ │ │ │
│ │ │ Pattern │ │ │
│ │ │ Detection │ │ │
│ │ ├───────────►│ │ │
│ │ │ SELECT │ │ │
│ │ │ 90d match │ │ │
│ │ │◄───────────┤ │ │
│ │ │ (+30 pts) │ │ │
│ │ │ │ │ │
│ │ │ Score: 75 │ │ │
│ │ │ FLAGGED! │ │ │
│ │ │ │ │ │
│ │ │ Calculate │ │ │
│ │ │ Payment │ │ │
│ │ │ │ │ │
│ │ │ Get │ │ │
│ │ │ Claim ID │ │ │
│ │ ├───────────►│ │ │
│ │ │ CLAIM_SEQ │ │ │
│ │ │◄───────────┤ │ │
│ │ │ │ │ │
│ │ │ INSERT │ │ │
│ │ │ Claim │ │ │
│ │ ├───────────►│ │ │
│ │ │ (FRAUD │ │ │
│ │ │ FLAG=Y) │ │ │
│ │ │◄───────────┤ │ │
│ │ │ │ │ │
│ │ │ UPDATE │ │ │
│ │ │ Policy │ │ │
│ │ ├───────────►│ │ │
│ │ │◄───────────┤ │ │
│ │ │ │ │ │
│ │ │ Write │ │ │
│ │ │ Output │ │ │
│ │ ├────────────┼──────────►│ │
│ │ │ │ (500 B) │ │
│ │ │ │ Status: │ │
│ │ │ │ INVEST. │ │
│ │ │ │ │ Route to │
│ │ │ │ │ Fraud Unit │
│ │ │ │ ├─────────────►│
│ │ │ │ │ │
| Interface | DD Name | Type | Direction | Format | Frequency | Record Length | Source System |
|---|---|---|---|---|---|---|---|
| Policy Input | POLFILE | Sequential File | Input | Fixed | Daily/Weekly | 800 bytes | Policy Management System |
| Renewal Input | RENFILE | Sequential File | Input | Fixed | Monthly/Quarterly | 600 bytes | Renewal Management System |
| Claims Input | CLMFILE | Sequential File | Input | Fixed | Daily | 900 bytes | Claims Processing System |
| Interface | DD Name | Type | Direction | Format | Frequency | Record Length | Target System |
|---|---|---|---|---|---|---|---|
| Policy Output | POLOUT | Sequential File | Output | Fixed | Daily/Weekly | 500 bytes | Policy Administration System |
| Renewal Output | RENOUT | Sequential File | Output | Fixed | Monthly/Quarterly | 500 bytes | Renewal Confirmation System |
| Claims Output | CLMOUT | Sequential File | Output | Fixed | Daily | 500 bytes | Claims Payment System |
| Error Log | ERRFILE | Sequential File | Output | Fixed | Continuous | 250 bytes | Error Management System |
| Processing Report | RPTFILE | Sequential File | Output | Fixed (FBA) | Per Batch Run | 133 bytes | Reporting System |
| Interface | Type | Direction | Operations | Frequency | Transaction Management |
|---|---|---|---|---|---|
| POLICY_TABLE | DB2 Table | Bidirectional | SELECT, INSERT, UPDATE | Per Record | Commit every 500 records |
| CLAIM_TABLE | DB2 Table | Bidirectional | SELECT, INSERT | Per Record | Commit every 500 records |
| CUSTOMER_TABLE | DB2 Table | Bidirectional | MERGE | Per Record | Commit every 500 records |
| PROVIDER_TABLE | DB2 Table | Input | SELECT | Per Claim | Read-only |
| POLICY_SEQ | DB2 Sequence | Input | SELECT NEXT VALUE | Per Policy/Renewal | N/A |
| CLAIM_SEQ | DB2 Sequence | Input | SELECT NEXT VALUE | Per Claim | N/A |
Detection: File status codes other than '00' during file open operations
Severity: CRITICAL (error codes 1101-1199)
Response:
Recovery:
Detection: File status codes other than '00' or '10' during READ operations
Severity: SEVERE (varies by file)
Response:
Recovery:
Detection: File status codes other than '00' during WRITE operations
Severity: CRITICAL (may trigger rollback)
Response:
Recovery:
Detection: SQLCODE not equal to 0 during CONNECT
Severity: CRITICAL (error code 1150)
Response:
Recovery:
Detection: SQLCODE < 0 (negative values) or SQLCODE = 100 (not found) in unexpected context
Severity: SEVERE (error codes vary by operation)
Response:
Common SQLCODES:
Recovery:
Detection: SQLCODE errors during COMMIT or ROLLBACK
Severity: CRITICAL
Response:
Recovery:
Examples:
Severity: WARNING (varies)
Response:
Recovery:
Examples:
Severity: WARNING
Response:
Recovery:
Examples:
Severity: SEVERE
Response:
Recovery:
Current System Limitation: No automatic checkpoint/restart
Manual Restart Procedure:
Future Enhancement: Implement checkpoint/restart using:
Daily Process:
Automatic Rollback Scenarios:
Impact:
Recovery Consideration:
Data Quality:
File Delivery:
Data Consistency:
Timing:
Volume:
File Consumption:
Data Processing:
Error Handling:
Reconciliation:
Fraud Investigation:
Availability:
Performance:
Capacity:
Referential Integrity:
Backup and Recovery:
JCL Execution:
Resource Availability:
Monitoring:
File Retention:
Version Control:
Authentication:
Authorization:
Data Protection:
Audit:
As the Insurance Management System evolves, consider the following integration enhancements:
Real-Time APIs:
Event-Driven Architecture:
Data Lake Integration:
Cloud Integration:
Microservices Decomposition:
The Insurance Management System implements a robust batch-oriented integration architecture leveraging sequential file processing and DB2 database persistence. The eight-file integration model (three input, three output, one error, one report) provides clear separation of concerns and facilitates upstream/downstream system integration. Database integration through embedded SQL ensures transactional consistency with commit/rollback support.
Key integration strengths include:
Areas for future enhancement:
The integration architecture effectively balances mainframe batch processing constraints with modern business requirements for reliable, auditable insurance operations processing.