arunkumars-mf/atx-mainframe-bre-analyzer
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.
AWS Transform for mainframe (ATX) - Mainframe BRE Analyzer
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
- ATX Analysis: Analyzes your mainframe codebase and produces BRE output
- ATX Mainframe BRE Analyzer: Uses the BRE analysis results for business rules exploration
- 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 pointsget_business_function_details
- Get detailed information about a specific business functionget_business_function_rules
- Get comprehensive rule count and analysis for a business functionget_all_business_function_rule_counts
- Get rule counts for all business functions
Component Discovery
list_all_components
- List all COBOL and JCL component filessearch_components
- Search for component files by pattern or program nameread_component_bre_content
- Read the complete content of a component BRE JSON fileget_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:
- Run ATX Analysis on your mainframe codebase
- Use the BRE output directories generated by ATX
- Launch this tool (as MCP server or library) for business rules analysis
- Plan modernization using business function insights
- Map to microservices based on business logic boundaries
License
MIT License - see LICENSE file for details.