atx-mainframe-bre-analyzer

arunkumars-mf/atx-mainframe-bre-analyzer

3.2

If you are the rightful owner of atx-mainframe-bre-analyzer and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

AWS Transform for mainframe (ATX) - Mainframe BRE Analyzer is a tool designed to enhance the analysis of Business Rules Extraction (BRE) output as part of AWS Transform for mainframe initiatives.

Tools
5
Resources
0
Prompts
0

AWS Transform for mainframe (ATX) - Mainframe BRE Analyzer

PyPI version PyPI Downloads Python versions License: MIT

A comprehensive tool for analyzing ATX Business Rules Extraction (BRE) output as part of AWS Transform for mainframe (ATX) initiatives. Can be used as both an MCP server and a Python library.

Overview

This tool extends the AWS Transform for mainframe (ATX) analysis workflow by providing advanced Business Rules Extraction analysis capabilities for mainframe applications. It works with the BRE output produced by the ATX analysis step to enable deeper insights into business logic and modernization planning.

ATX Integration Workflow

ATX Analysis → BRE Output + Application/Component Analysis → ATX Mainframe BRE Analyzer → Business Rules Analysis
  1. ATX Analysis: Analyzes your mainframe codebase and produces BRE output
  2. ATX Mainframe BRE Analyzer: Uses the BRE analysis results for business rules exploration
  3. Business Rules Analysis: Provides tools for business function mapping, component discovery, and modernization planning

Features

  • Business Function Analysis: Navigate business functions and their entry points
  • Component Mapping: Map business functions to COBOL and JCL components
  • Search and Discovery: Find components by pattern or program name
  • BRE Overview: Get comprehensive statistics about your business rules
  • Modernization Planning: Support microservices architecture planning
  • Dual Usage: Works as both MCP server and Python library

Prerequisites

  • ATX Analysis: Must be completed first to generate the BRE output
  • BRE Directories: Application Level and Component Level BRE analysis results
  • Same Codebase: Use the identical codebase that was analyzed by ATX

Installation

For MCP Server Usage

No installation needed! The MCP configuration with uvx will automatically download and run the package.

For Python Library Usage

pip install atx-mainframe-bre-analyzer

Quick Start

Configuration

Set these environment variables to point to your ATX BRE analysis outputs:

export ATX_MF_APPLICATION_LEVEL_BRE="/path/to/application/level/bre"
export ATX_MF_COMPONENT_LEVEL_BRE="/path/to/component/level/bre"

As MCP Server

{
  "mcpServers": {
    "atx-mainframe-bre-analyzer": {
      "command": "uvx",
      "args": ["atx-mainframe-bre-analyzer"],
      "env": {
        "ATX_MF_APPLICATION_LEVEL_BRE": "/path/to/application/level/bre",
        "ATX_MF_COMPONENT_LEVEL_BRE": "/path/to/component/level/bre"
      }
    }
  }
}

As Python Library

from atx_mainframe_bre_analyzer.server import BRENavigator
import os

# Set environment variables
os.environ['ATX_MF_APPLICATION_LEVEL_BRE'] = "/path/to/application/level/bre"
os.environ['ATX_MF_COMPONENT_LEVEL_BRE'] = "/path/to/component/level/bre"

# Initialize and analyze
navigator = BRENavigator()
functions = navigator.get_business_functions()
components = navigator.get_all_component_files()

Available Tools

Business Function Analysis

  • list_business_functions - List all business functions with entry points
  • get_business_function_details - Get detailed information about a specific business function
  • get_business_function_rules - Get comprehensive rule count and analysis for a business function
  • get_all_business_function_rule_counts - Get rule counts for all business functions

Component Discovery

  • list_all_components - List all COBOL and JCL component files
  • search_components - Search for component files by pattern or program name
  • read_component_bre_content - Read the complete content of a component BRE JSON file
  • get_component_rule_analysis - Get detailed rule analysis for a specific component

System Analysis

  • get_bre_overview - Get complete BRE hierarchy overview with statistics

Usage Examples

Basic Analysis

# Get all business functions
functions = navigator.get_business_functions()
print(f"Found {len(functions)} business functions")

# Get component overview
components = navigator.get_all_component_files()
print(f"COBOL: {len(components['cobol'])}, JCL: {len(components['jcl'])}")

# Search for specific components
results = navigator.search_components_by_pattern("COACT")
print(f"Found {len(results['cobol'])} COBOL matches")

Rule Analysis

# Get rule analysis for a specific component
rule_analysis = navigator.count_rules_in_bre_file(Path("component.json"))
print(f"Total rules: {rule_analysis['total_rules']}")
print(f"Business rules: {rule_analysis['business_rules']}")

# Get comprehensive rule analysis for a business function
function_rules = navigator.get_business_function_rule_count("AccountManagement")
print(f"Function rules: {function_rules['total_rules']}")
print(f"Components analyzed: {len(function_rules['components'])}")

# Read complete BRE content for a component
content = navigator.read_component_bre_file("PROGRAM1", "cbl")
if "error" not in content:
    print(f"File size: {content['file_size']} bytes")
    print(f"Data keys: {list(content['data'].keys())}")

Business Function Discovery

# Get details for a specific business function
for func in functions:
    if "Account" in func["name"]:
        print(f"Function: {func['name']}")
        print(f"Entry Points: {len(func['entry_points'])}")
        for ep in func['entry_points']:
            print(f"  - {ep['name']}: {ep['component_dependencies']}")

ATX BRE Output Format

The BRE analysis is produced by the ATX analysis step and follows this structure:

Application Level BRE:

ApplicationLevelAnalysis/
ā”œā”€ā”€ BusinessFunction1/
│   ā”œā”€ā”€ BusinessFunction1.json
│   ā”œā”€ā”€ entrypoint-PROGRAM1/
│   └── entrypoint-PROGRAM2/
└── BusinessFunction2/
    └── ...

Component Level BRE:

ComponentLevelAnalysis/
ā”œā”€ā”€ cbl/
│   ā”œā”€ā”€ PROGRAM1.json
│   └── PROGRAM2.json
└── jcl/
    ā”œā”€ā”€ JOB1.json
    └── JOB2.json

Note: These directories are automatically generated by ATX analysis - you don't need to create them manually.

AWS Transform Integration

This tool is designed to work seamlessly with AWS Transform for mainframe (ATX) workflows:

  1. Run ATX Analysis on your mainframe codebase
  2. Use the BRE output directories generated by ATX
  3. Launch this tool (as MCP server or library) for business rules analysis
  4. Plan modernization using business function insights
  5. Map to microservices based on business logic boundaries

License

MIT License - see LICENSE file for details.